Communications method and apparatus

ABSTRACT

A communications method includes determining a session management function entity based on at least one of a data network name, slice information, and an application function service identifier, and sending a first message to the session management function entity, where the first message is used to subscribe to a terminal event, the first message includes service description information, and the service description information is used to indicate a service corresponding to the terminal event.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Patent ApplicationNo. PCT/CN2019/081974, filed on Apr. 9, 2019, which claims priority toChinese Patent Application No. 201810313171.8, filed on Apr. 9, 2018 andclaims priority to Chinese Patent Application No. 201811378685.8, filedon Nov. 19, 2018 and claims priority to Chinese Patent Application No.201910120722.3, filed on Feb. 18, 2019, all of which are herebyincorporated by reference in their entireties.

TECHNICAL FIELD

This application relates to the field of communications technologies,and in particular, to a communications method and apparatus.

BACKGROUND

FIG. 1 is a schematic diagram of an existing evolved packet system (EPS)non-roaming architecture. To support a service capabilityserver/application server (SCS/AS) having a third-party application(such as a machine type application) installed in using an EPS network,the existing network architecture is enhanced. A service capabilityexposure function (SCEF) network element is introduced. FIG. 2 is aschematic architecture diagram of an interface in a 3rd generationpartnership project (3GPP) EPS network architecture opened using anSCEF, where the SCEF provides, to the SCS/AS, a service and a capabilitythat are provided by a secure 3GPP network interface.

A machine-type service includes a service that has a low latencyrequirement, that is, a high-latency service. Based on the foregoingcapability exposure architecture, to support high-latency servicecommunication, a monitoring event of “terminal availability afterdownlink data notification (DDN) failure (availability after DDNfailure)” is defined. In other words, the SCS/AS may subscribe to themonitoring event of “availability after DDN failure” from the 3GPP EPSnetwork using the SCEF. When the SCS/AS sends a data packet to aterminal in the EPS network, if the terminal is in an unavailable state,the EPS network activates the event of “availability after DDN failure”,that is, monitors a status of the terminal. When the terminal enters anavailable state, the network reports the available state of the terminalto the SCS/AS using the SCEF such that the SCS/AS resends data to theterminal.

In an existing technical solution, both a session and mobility arecontrolled by a mobility management entity (MME). When a DDN messagesent by a serving gateway (SGW) is received, and when a terminal is inan unavailable state, for example, the MME initiates paging for theterminal but receives no response, the terminal is in a power savingmode (PSM), or the terminal is in a mobile initiated connection only(MICO) mode, the MME directly activates a monitoring event. However, inan architecture of a fifth-generation (5G) mobile communications system,session management, access, and mobility management are separatelycontrolled by different function entities. In this architecture, how anetwork configures a corresponding terminal event and activates thereported event is a problem that has not been resolved currently.

SUMMARY

This application provides a communications method and apparatus tosubscribe to a terminal event in a 5G architecture.

According to a first aspect, a communications method is provided, andincludes determining a session management function (SMF) entity based onat least one of a data network name (DNN), slice information, and anapplication function service identifier, and sending a first message tothe session management function entity, where the first message is usedto subscribe to a terminal event, the first message includes servicedescription information, and the service description information is usedto indicate a service corresponding to the terminal event.

In this aspect, the terminal event is subscribed to from the sessionmanagement function entity that manages a specific service, and thesession management function entity manages a network configurationsubsequent to the terminal event. In this way, a terminal event may besubscribed to and monitored for a specific service in a 5G architecture.

With reference to the first aspect, in a first possible implementation,the service description information is further used to determine anapplication function entity that provides a service for a terminal.

In this implementation, one or more application function entities mayprovide a service for a terminal. When subscribing to a terminal event,service description information is used to indicate the servicecorresponding to the terminal event such that the application functionentities that subscribe to the terminal event can be distinguished fromeach other.

With reference to the first aspect or the first possible implementationof the first aspect, in a second possible implementation, the firstmessage further includes an event correlation identifier and event typeinformation of the terminal event, the event correlation identifier isused to identify a correlation relationship between the terminal eventand a function entity that subscribes to the terminal event, and theevent type information is used to identify the terminal event.

In this implementation, when the terminal event is subscribed to fromthe session management function entity, the event correlation identifierand the event type information are carried. A function entity thatsubscribes to the terminal event may be identified based on the eventcorrelation identifier, and an event type of the terminal event may beidentified based on the event type information.

With reference to the first aspect or the first possible implementationof the first aspect, in a third possible implementation, the methodfurther includes sending a second message to an access and mobilitymanagement function (AMF) entity, where the second message is used tosubscribe to the terminal event, the second message includes an eventcorrelation identifier and event type information of the terminal event,the event correlation identifier is used to identify a correlationrelationship between the terminal event and a function entity thatsubscribes to the terminal event, and the event type information is usedto identify the terminal event.

In this implementation, when the terminal event is subscribed to fromthe AMF entity, the event correlation identifier and the event typeinformation are carried. A function entity that subscribes to theterminal event may be identified based on the event correlationidentifier, and an event type of the terminal event may be identifiedbased on the event type information.

With reference to the first aspect, the first possible implementation ofthe first aspect, the second possible implementation of the firstaspect, or the third possible implementation of the first aspect, in afourth possible implementation, the method further includes receiving athird message from the application function entity, where the thirdmessage is used to subscribe to the terminal event, and the thirdmessage includes the service description information.

In this implementation, the application function entity may subscribe tothe terminal event from a control function entity, when subscribing tothe terminal event, the application function entity indicates, using theservice description information, the service corresponding to theterminal event, to distinguish between third-party applications thatsubscribe to the terminal event. The control function entity may be anetwork exposure function (NEF) entity, a unified data management (UDM)function entity, or a policy control function (PCF) entity.

With reference to the fourth possible implementation of the firstaspect, in a fifth possible implementation, the third message furtherincludes at least one of the following information an identifier of theterminal corresponding to the terminal event, the event type informationof the terminal event, the DNN, the slice information, and theapplication function service identifier.

With reference to the fourth possible implementation of the first aspector the fifth possible implementation of the first aspect, in a sixthpossible implementation, the receiving a third message from theapplication function entity includes receiving the third messageforwarded by the network exposure function entity.

With reference to the fourth possible implementation of the firstaspect, the fifth possible implementation of the first aspect, or thesixth possible implementation of the first aspect, in a seventh possibleimplementation, the method further includes sending at least one of theservice description information, the event correlation identifier, theidentifier of the terminal, the event type of the terminal event, theDNN, the slice information, and the application function serviceidentifier to a unified data repository (UDR) function entity forstorage.

In this implementation, the unified data repository function entity maystore all information related to the subscribed terminal event.

With reference to the first aspect, the first possible implementation ofthe first aspect, the second possible implementation of the firstaspect, the third possible implementation of the first aspect, thefourth possible implementation of the first aspect, the fifth possibleimplementation of the first aspect, the sixth possible implementation ofthe first aspect, or the seventh possible implementation of the firstaspect, in an eighth possible implementation, the method furtherincludes obtaining at least one of the service description information,the event correlation identifier, the identifier of the terminal, theevent type information of the terminal event, the DNN, the sliceinformation, and the application function service identifier locally orfrom the unified data repository function entity.

With reference to the fourth possible implementation of the firstaspect, the fifth possible implementation of the first aspect, the sixthpossible implementation of the first aspect, the seventh possibleimplementation of the first aspect, or the eighth possibleimplementation of the first aspect, in a ninth possible implementation,the method further includes receiving the terminal event notificationfrom the AMF entity or the session management function entity, andsending the terminal event notification to the application functionentity.

In this implementation, when the terminal event is detected, the AMFentity or the session management function entity notifies the networkexposure function entity, and then the network exposure function entitynotifies the application function entity that the terminal event isdetected.

With reference to the first aspect, the first possible implementation ofthe first aspect, the second possible implementation of the firstaspect, the third possible implementation of the first aspect, thefourth possible implementation of the first aspect, the fifth possibleimplementation of the first aspect, the sixth possible implementation ofthe first aspect, the seventh possible implementation of the firstaspect, the eighth possible implementation of the first aspect, or theninth possible implementation of the first aspect, in a tenth possibleimplementation, the event type of the terminal event includes an eventof terminal availability after DDN failure.

Correspondingly, according to a second aspect, a communicationsapparatus is provided. The communications apparatus has a function ofimplementing behavior of a communications apparatus in the foregoingmethod. The function may be implemented by hardware, or may beimplemented by hardware executing corresponding software. The hardwareor the software includes one or more modules corresponding to theforegoing function.

In a possible implementation, the communications apparatus includes aprocessing unit configured to determine a session management functionentity based on at least one of a DNN, slice information, and anapplication function service identifier, and a sending unit configuredto send a first message to the session management function entity, wherethe first message is used to subscribe to a terminal event, the firstmessage includes service description information, and the servicedescription information is used to indicate a service corresponding tothe terminal event.

In another possible implementation, the communications apparatusincludes a processor, where the processor is configured to be coupled toa memory, and read and execute an instruction in the memory, toimplement the foregoing method.

Based on a similar concept, for principles and beneficial effects of theapparatus for resolving a problem, refer to the foregoing possiblemethod implementations of the communications apparatus and beneficialeffects that are brought. Therefore, for implementation of theapparatus, refer to the implementation of the method. Repeated parts arenot described again.

According to a third aspect, a communications method is provided, andincludes receiving a first message sent by a session management functionentity, where the first message is used to subscribe to a terminalevent, monitoring the subscribed terminal event, and when the terminalevent is detected, sending a terminal event notification to a functionentity that subscribes to the terminal event, where the terminal eventnotification includes at least one of the following information anidentifier of a terminal corresponding to the terminal event and anevent correlation identifier of the terminal event, where the eventcorrelation identifier is used to identify a correlation relationshipbetween the terminal event and the function entity that subscribes tothe terminal event.

In this aspect, an AMF entity may receive subscription of the terminalevent from the session management function entity, and send, when theterminal event is detected, the terminal event notification to thefunction entity that subscribes to the terminal event. In this way, aterminal event may be subscribed to and monitored in a 5G architecture.

Correspondingly, according to a fourth aspect, a communicationsapparatus is provided. The communications apparatus has a function ofimplementing behavior of a communications apparatus in the foregoingmethod. The function may be implemented by hardware, or may beimplemented by hardware executing corresponding software. The hardwareor the software includes one or more modules corresponding to theforegoing function.

In a possible implementation, the communications apparatus includes areceiving unit configured to receive a first message sent by a sessionmanagement function entity, where the first message is used to subscribeto a terminal event, a monitoring unit configured to monitor thesubscribed terminal event, and a sending unit configured to, when themonitoring unit detects the terminal event, send a terminal eventnotification to a function entity that subscribes to the terminal event,where the terminal event notification includes at least one of thefollowing information an identifier of a terminal corresponding to theterminal event and an event correlation identifier of the terminalevent, where the event correlation identifier is used to identify acorrelation relationship between the terminal event and a functionentity that subscribes to the terminal event.

In another possible implementation, the communications apparatusincludes a processor, where the processor is configured to be coupled toa memory, and read and execute an instruction in the memory, toimplement the foregoing method.

Based on a similar concept, for principles and beneficial effects of theapparatus for resolving a problem, refer to the foregoing possiblemethod implementations of the communications apparatus and beneficialeffects that are brought. Therefore, for implementation of theapparatus, refer to the implementation of the method. Repeated parts arenot described again.

According to a fifth aspect, a communications method is provided, andincludes receiving a notification that is for monitoring a terminalreachability event and that is sent by a session management functionentity or a control function entity, monitoring the terminalreachability event, and sending a terminal reachability notification tothe session management function entity or the control function entitywhen the terminal reachability event is detected, where the terminalreachability notification is used to monitor an event of terminalavailability after DDN failure.

In this aspect, the session management function entity may monitor theevent of terminal availability after DDN failure. When detecting that aterminal is reachable, an AMF entity notifies the session managementfunction entity, to activate the session management function entity tomonitor the event of terminal availability after DDN failure. In thisway, a terminal event may be subscribed to and monitored in a 5Garchitecture.

Correspondingly, according to a sixth aspect, a communications apparatusis provided. The communications apparatus has a function of implementingbehavior of a communications apparatus in the foregoing method. Thefunction may be implemented by hardware, or may be implemented byhardware executing corresponding software. The hardware or the softwareincludes one or more modules corresponding to the foregoing function.

In a possible implementation, the communications apparatus includes areceiving unit configured to receive a notification that is formonitoring a terminal reachability event and that is sent by a sessionmanagement function entity, a monitoring unit configured to monitor theterminal reachability event, and a sending unit configured to send aterminal reachability notification to the session management functionentity when the monitoring unit detects the terminal reachability event,where the terminal reachability notification is used to monitor an eventof terminal availability after DDN failure.

In another possible implementation, the communications apparatusincludes a processor, where the processor is configured to be coupled toa memory, and read and execute an instruction in the memory, toimplement the foregoing method.

Based on a similar concept, for principles and beneficial effects of theapparatus for resolving a problem, refer to the foregoing possiblemethod implementations of the communications apparatus and beneficialeffects that are brought. Therefore, for implementation of theapparatus, refer to the implementation of the method. Repeated parts arenot described again.

According to a seventh aspect, a communications method is provided, andincludes instructing a user plane function (UPF) entity to detect aservice, where the service is a service corresponding to a subscribedterminal event, receiving a service detection notification sent by theUPF entity, where the service detection notification is used to indicateoccurrence of the service data, and sending, in response to the servicedetection notification, a notification that is for monitoring theterminal event to an AMF entity or a control function entity.

In this aspect, the terminal event is subscribed to from a sessionmanagement function entity that manages a specific service, whenreceiving the service detection notification from the UPF entity, thesession management function entity instructs the AMF entity to monitorthe terminal event. In this way, a terminal event may be subscribed toand monitored for a specific service in a 5G architecture.

With reference to the seventh aspect, in a first possibleimplementation, the instructing a UPF entity to detect a serviceincludes instructing the UPF entity to detect the service when the UPFentity does not store access network tunnel information or downlink userplane tunnel information for transmitting the service data, orinstructing the UPF entity to perform service detection notificationwhen the UPF entity does not store access network tunnel information ordownlink user plane tunnel information for transmitting the servicedata.

With reference to the seventh aspect or the first possibleimplementation of the seventh aspect, in a second possibleimplementation, the method further includes receiving a first messagesent by the control function entity, where the first message is used toindicate the service, and the first message includes service descriptioninformation of the service.

In this implementation, subscription of the terminal event is receivedfrom the control function entity, when the terminal event is subscribedto, the service description information is used to indicate a servicecorresponding to the terminal event, to distinguish between third-partyapplications that subscribe to the terminal event.

With reference to the second possible implementation of the seventhaspect, in a third possible implementation, the first message is furtherused to subscribe to the terminal event, the first message includes anevent correlation identifier and event type information of the terminalevent, the event correlation identifier is used to identify acorrelation relationship between the terminal event and a functionentity that subscribes to the terminal event, and the event typeinformation is used to identify the terminal event.

In this implementation, when the terminal event is subscribed to fromthe session management function entity, the event correlation identifierand the event type information are carried. A function entity thatsubscribes to the terminal event may be identified based on the eventcorrelation identifier, and an event type of the terminal event may beidentified based on the event type information.

With reference to the third possible implementation of the seventhaspect, in a fourth possible implementation, the terminal event includesan event of terminal availability after DDN failure, and the methodfurther includes receiving a terminal reachability notification or anotification on an event of terminal availability after DDN failure thatis sent by the AMF entity, and sending the notification on terminalavailability after DDN failure to a network exposure function entity oran application function entity.

With reference to the seventh aspect or the first possibleimplementation of the seventh aspect, in a fifth possibleimplementation, the method further includes receiving a first messagesent by a local session management function entity, where the firstmessage is used to indicate the service, and the first message includesservice description information of the service.

In this implementation, in a roaming scenario, subscription to theterminal event from the local session management function entity isreceived, when the terminal event is subscribed to, a servicecorresponding to the terminal event is indicated by the servicedescription information, to distinguish between third-party applicationsthat subscribe to the terminal event.

Correspondingly, according to an eighth aspect, a communicationsapparatus is provided. The communications apparatus has a function ofimplementing behavior of a communications apparatus in the foregoingmethod. The function may be implemented by hardware, or may beimplemented by hardware executing corresponding software. The hardwareor the software includes one or more modules corresponding to theforegoing function.

In a possible implementation, the communications apparatus includes asending unit configured to instruct a UPF entity to detect a service,where the service is a service corresponding to a subscribed terminalevent, and a receiving unit configured to receive a service detectionnotification sent by the UPF entity, where the service detectionnotification is used to indicate occurrence of the service data, wherethe sending unit is further configured to send, in response to theservice detection notification, a notification that is for monitoringthe terminal event to an AMF entity.

In another possible implementation, the communications apparatusincludes a processor, where the processor is configured to be coupled toa memory, and read and execute an instruction in the memory, toimplement the foregoing method.

Based on a similar concept, for principles and beneficial effects of theapparatus for resolving a problem, refer to the foregoing possiblemethod implementations of the communications apparatus and beneficialeffects that are brought. Therefore, for implementation of theapparatus, refer to the implementation of the method. Repeated parts arenot described again.

According to a ninth aspect, a communications method is provided, andincludes receiving a first message sent by a session management functionentity, where the first message is used to instruct to detect a service,and the service is a service corresponding to a subscribed terminalevent, detecting the service based on the first message, and sending aservice detection notification to the session management functionentity, where the service detection notification is used to indicateoccurrence of the service data.

In this aspect, when receiving the service data, based on a servicedetection indication of the session management function entity, theservice corresponding to the subscribed terminal event is detected, andthe session management function entity is notified. In this way, aterminal event may be subscribed to and monitored in a 5G architecture.

With reference to the ninth aspect, in a first possible implementation,the detecting the service based on the first message includes detectingthe service based on the first message when access network tunnelinformation for transmitting the service data is not stored.

Correspondingly, according to a tenth aspect, a communications apparatusis provided. The communications apparatus has a function of implementingbehavior of a communications apparatus in the foregoing method. Thefunction may be implemented by hardware, or may be implemented byhardware executing corresponding software. The hardware or the softwareincludes one or more modules corresponding to the foregoing function.

In a possible implementation, the communications apparatus includes areceiving unit configured to receive a first message sent by a sessionmanagement function entity, where the first message is used to instructto detect a service, and the service is a service corresponding to asubscribed terminal event, a detection unit configured to detect theservice based on the first message, and a sending unit configured tosend a service detection notification to the session management functionentity, where the service detection notification is used to indicateoccurrence of the service data.

In another possible implementation, the communications apparatusincludes a processor, where the processor is configured to be coupled toa memory, and read and execute an instruction in the memory, toimplement the foregoing method.

Based on a similar concept, for principles and beneficial effects of theapparatus for resolving a problem, refer to the foregoing possiblemethod implementations of the communications apparatus and beneficialeffects that are brought. Therefore, for implementation of theapparatus, refer to the implementation of the method. Repeated parts arenot described again.

According to an eleventh aspect, a communications method is provided,and includes instructing a UPF entity to detect a service, where theservice is a service corresponding to a terminal event subscribed to bya first application function entity, receiving a service detectionnotification sent by the UPF entity, where the service detectionnotification is used to indicate that data of the service is detected,when a terminal is unreachable, monitoring the terminal event based onthe service detection notification, and when the terminal event isdetected, sending a terminal event notification to a network exposurefunction entity or the first application function entity.

In this aspect, a session management function entity instructs the UPFentity to detect a specific service, when the terminal is unreachable,the session management function entity monitors the terminal event basedon the service detection notification sent by the UPF entity, and sendsthe terminal event notification when detecting the terminal event. Inthis way, a terminal event for a specific service may be subscribed toand notified of in a 5G architecture.

With reference to the eleventh aspect, in a first possibleimplementation, the terminal event includes an event of terminalavailability after DDN failure or a terminal reachability event.

With reference to the first possible implementation of the eleventhaspect, in a second possible implementation, the detecting the terminalevent is receiving a terminal reachability event notification or anotification on the event of terminal availability after downlink datasending failure that is sent by the AMF entity.

With reference to the eleventh aspect or the first possibleimplementation of the eleventh aspect or the second possibleimplementation of the eleventh aspect, in a third possibleimplementation, the method further includes, before a notification ondownlink data sending failure sent by the AMF entity is received or theservice is detected, determining that the terminal is unreachable if anunreachability notification sent by the AMF entity is received.

In this implementation, that the terminal is unreachable may be that adownlink data failure notification sent by the AMF is received, or maybe that an SMF receives an unreachability notification from the AMF whenanother application function entity sends service data.

With reference to the third possible implementation of the eleventhaspect, in a fourth possible implementation, the method further includesreceiving a first message sent by a local session management functionentity, where the first message is used to indicate the service andinstruct to subscribe to the terminal event, and the first messageincludes service description information of the service and an eventcorrelation identifier and event type information of the terminal event,where the event correlation identifier is used to identify a correlationrelationship between the terminal event and a function entity thatsubscribes to the terminal event, and the event type information is usedto identify the terminal event.

In this implementation, in a roaming scenario, the session managementfunction entity accessing a network may monitor the terminal event.

Correspondingly, according to a twelfth aspect, a communicationsapparatus is provided. The communications apparatus has a function ofimplementing behavior of a communications apparatus in the method in theeleventh aspect. The function may be implemented by hardware, or may beimplemented by hardware executing corresponding software. The hardwareor the software includes one or more modules corresponding to theforegoing function.

In a possible implementation, the communications apparatus includes aninstruction unit configured to instruct a UPF entity to detect aservice, where the service is a service corresponding to a terminalevent subscribed to by a first application function entity, a receivingunit configured to receive a service detection notification sent by theUPF entity, where the service detection notification is used to indicatethat data of the service is detected, a monitoring unit configured to,when a terminal is unreachable, monitor the terminal event based on theservice detection notification, and a sending unit configured to, whenthe terminal event is detected, send a terminal event notification to anetwork exposure function entity or the first application functionentity.

In another possible implementation, the communications apparatusincludes a processor, where the processor is configured to be coupled toa memory, and read and execute an instruction in the memory, toimplement the foregoing method.

Based on a similar concept, for principles and beneficial effects of theapparatus for resolving a problem, refer to the foregoing possiblemethod implementations of the communications apparatus and beneficialeffects that are brought. Therefore, for implementation of theapparatus, refer to the implementation of the method. Repeated parts arenot described again.

According to a thirteenth aspect, a communications method is provided,and includes receiving a first message that is for a terminal event andthat is sent by a control function entity, where the first message isused to subscribe to the terminal event, and the first message includesservice description information and a DNN/single network slice selectionassistance information (S-NSSAI), sending a second message to a sessionmanagement function entity, where the second message is used tosubscribe to a service detection event, and the second message includesthe service description information, receiving a service detectionnotification from the session management function entity, activating theterminal event when a terminal is unreachable, and sending a terminalreachability notification to a capability exposure node or anapplication function entity when detecting that the terminal isreachable.

In an implementation, the sending a second message to a sessionmanagement function entity includes sending the second message to thesession management function entity when a DNN/S-NSSAI of a session isthe same as the DNN/S-NSSAI included in the first message.

In another implementation, the sending a second message to a sessionmanagement function entity includes sending a subscription request to alocal session management function entity or a roaming session managementfunction entity, or sending a session context update request to a localsession management function entity or a roaming session managementfunction entity, where the session context update request is used tosubscribe to the terminal event.

According to a fourteenth aspect, a communications method is provided,and includes receiving a second message for a terminal event from amobility management function entity AMF, sending a third message to aUPF entity, where the third message is used to instruct to detect aservice, and the service is a service corresponding to the subscribedterminal event, receiving a service detection notification from the UPFentity, where the service detection notification is used to indicateoccurrence of the service data, and sending the service detectionnotification to the mobility management function entity.

In an implementation, the receiving a second message for a terminalevent from a mobility management function entity includes receiving asession context update request from the mobility management functionentity, where the session context update request is used to subscribe tothe terminal event.

In another implementation, the sending a third message to a UPF entityincludes sending the third message to the UPF entity during or afterprotocol data unit (PDU) session deactivation, where the third messageis used to instruct to detect the service, and the service is theservice corresponding to the subscribed terminal event.

According to a fifteenth aspect, a communications method is provided,and includes receiving a first message from a control function entity,where the first message is used to subscribe to a terminal event, thefirst message includes service description information, and the servicedescription information is used to indicate a service corresponding tothe terminal event, receiving service information from a UPF entity UPF,where the service information is determined based on a downlink datapacket, and sending event correlation information to a MME or acapability exposure entity based on at least the service information,where the event correlation information is used to determine eventreporting information.

In an implementation, before the receiving service information from aUPF entity, the method includes sending a service information request tothe UPF entity.

In another implementation, the sending a service information request tothe UPF entity includes sending the service information request to theUPF entity in case of a DDN failure.

In still another implementation, the sending event correlationinformation to a MIME or a capability exposure entity, where the eventcorrelation information is used to determine event reportinginformation, includes sending the event correlation information to theMME or the capability exposure entity based on the service descriptioninformation and the service information, where the event correlationinformation is used to determine event reporting information.

Correspondingly, according to a sixteenth aspect, a communicationsapparatus is provided. The communications apparatus has a function ofimplementing behavior of a communications apparatus in the methodaccording to any one of the thirteenth aspect to the fifteenth aspect orthe implementations thereof. The function may be implemented byhardware, or may be implemented by hardware executing correspondingsoftware. The hardware or the software includes one or more modulescorresponding to the foregoing function.

In a possible implementation, the communications apparatus includes aninstruction unit configured to instruct a UPF entity to detect aservice, where the service is a service corresponding to a terminalevent subscribed to by a first application function entity, a receivingunit configured to receive a service detection notification sent by theUPF entity, where the service detection notification is used to indicatethat data of the service is detected, a monitoring unit configured to,when a terminal is unreachable, monitor the terminal event based on theservice detection notification, and a sending unit configured to, whenthe terminal event is detected, send a terminal event notification to anetwork exposure function entity or the first application functionentity.

In another possible implementation, the communications apparatusincludes a processor, where the processor is configured to be coupled toa memory, and read and execute an instruction in the memory, toimplement the foregoing method.

Based on a similar concept, for principles and beneficial effects of theapparatus for resolving a problem, refer to the foregoing possiblemethod implementations of the communications apparatus and beneficialeffects that are brought. Therefore, for implementation of theapparatus, refer to the implementation of the method. Repeated parts arenot described again.

According to a seventeenth aspect, a computer-readable storage medium isprovided. The computer-readable storage medium stores an instruction.When the instruction is run on a computer, the computer is enabled toperform the method according to the foregoing aspects or theimplementations thereof.

According to an eighteenth aspect, a computer program product includingan instruction is provided. When the computer program product is run ona computer, the computer is enabled to perform the method according tothe foregoing aspects or the implementations thereof.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of thisapplication or in the background more clearly, the following brieflydescribes the accompanying drawings required for describing theembodiments of this application or the background.

FIG. 1 is a schematic diagram of an existing EPS non-roamingarchitecture.

FIG. 2 is a schematic architecture diagram of an interface in a 3GPP EPSnetwork architecture opened using an SCEF.

FIG. 3A is a schematic diagram of a non-roaming architecture based on aservice-based interface in 5G.

FIG. 3B is a schematic diagram of a non-roaming architecture based on areference point in 5G.

FIG. 4 is a schematic flowchart for configuring, by an applicationfunction entity, subscription of a terminal event for a networkaccording to an embodiment of this application.

FIG. 5A is a schematic flowchart of an example of configuring, by an AF,subscription of a terminal event for a UDM/PCF using an NEF.

FIG. 5B is a schematic flowchart of an example of configuring, by an AF,subscription of a terminal event for a UDR using a PCF.

FIG. 5C is a schematic flowchart of an example of configuring, by an AF,subscription of a terminal event for a UDR using an NEF.

FIG. 6A is a schematic flowchart of a communications method according toan embodiment of this application.

FIG. 6B is a schematic flowchart of another communications methodaccording to an embodiment of this application.

FIGS. 6C and FIG. 6D are a schematic flowchart of a specific example ofperforming terminal event notification by an NEF.

FIGS. 7A and FIG. 7B are a schematic flowchart of an example of acommunications method.

FIGS. 7C and FIG. 7D are a schematic flowchart of another example of acommunications method.

FIGS. 7E and FIG. 7F are a schematic flowchart of still another exampleof a communications method.

FIG. 7G to FIG. 71 are a schematic flowchart of still another example ofa communications method.

FIG. 7J to FIG. 7L are a schematic flowchart of still another example ofa communications method.

FIG. 8 is a schematic block diagram of a communications apparatusaccording to an embodiment of this application.

FIG. 9A is a schematic block diagram of another communications apparatusaccording to an embodiment of this application.

FIG. 9B is a schematic block diagram of still another communicationsapparatus according to an embodiment of this application.

FIG. 10 is a schematic block diagram of still another communicationsapparatus according to an embodiment of this application.

FIG. 11 is a schematic block diagram of still another communicationsapparatus according to an embodiment of this application.

FIG. 12 is a schematic structural diagram of hardware of acommunications apparatus according to an embodiment of this application.

FIG. 13 is a schematic flowchart of still another communications methodaccording to an embodiment of this application.

FIG. 14A to FIG. 14K are schematic flowcharts of still another exampleof a communications method.

FIG. 15 is a schematic block diagram of still another communicationsapparatus according to an embodiment of this application.

FIG. 16 is a schematic flowchart of still another communications methodaccording to an embodiment of this application.

FIGS. 17A and FIG. 17B are a schematic flowchart of still anothercommunications method according to an embodiment of this application.

FIG. 18A and FIG. 18B are a schematic flowchart of still anothercommunications method according to an embodiment of this application.

FIG. 19A and FIG. 19B are a schematic flowchart of still anothercommunications method according to an embodiment of this application.

FIG. 20A and FIG. 20B are a schematic flowchart of still anothercommunications method according to an embodiment of this application.

DESCRIPTION OF EMBODIMENTS

The following describes the embodiments of this application withreference to the accompanying drawings in the embodiments of thisapplication.

The technical solutions of this application may be applied to thenon-roaming architecture of the EPS network shown in FIG. 1 , or may beapplied to a roaming architecture of the EPS network, or may be appliedto a non-roaming architecture and a roaming architecture of a nextgeneration network, for example, the non-roaming architecture based onthe service-based interface in the fifth generation mobilecommunications network shown in FIG. 3A and the non-roaming architecturebased on the reference point in 5G shown in FIG. 3B.

Using the architectures of the 5G communications system shown in FIG. 3Aand FIG. 3B as an example, the communications system mainly includes anAMF entity, a SMF entity, a UPF entity, a NEF entity, and an AF entity,and may further include a PCF entity, a UDR function entity, and a UDMfunction entity. It should be noted that, the functional entities andfunctions of the function entities included in FIG. 3A may be the sameas those in FIG. 3B. In FIG. 3A, because the architecture is based onthe service-based interface, a message sent by a function entity toanother function entity needs to carry an identifier of the otherfunction entity. In FIG. 3B, because the architecture is based on thereference point, a message between function entities is an interfacemessage, and does not need to carry an identifier of a function entity.

The functions of the functional entities in FIG. 3A and FIG. 3B are asfollows.

AMF entity is mainly responsible for signaling processing, for example,functions such as access control, mobility management, attachment anddetachment, and gateway selection. When providing a service for asession in a terminal, the AMF entity provides a control plane storageresource for the session, to store a session identifier, an SMF entityidentifier correlated with the session identifier, and the like.

SMF entity is mainly responsible for session management, and furtherresponsible for selection of a UPF entity, redirection of the UPFentity, Internet Protocol (IP) address assignment, bearer setup,modification, and release, and control of quality of service (QoS).

UPF entity is responsible for forwarding and receiving of user data in aterminal. The UPF entity may receive user data from a data network, andtransmit the user data to a terminal using an access network device.Alternatively, the UPF entity may receive user data from a terminalusing an access network device, and forward the user data to a datanetwork. Resource transmission and scheduling functions in the UPFentity that are used to provide a service for a terminal are managed andcontrolled by the SMF entity.

NEF entity is mainly supports secure interaction between a 3GPP networkand a third-party application. The NEF can securely open a networkcapability and an event to a third-party application, to enhance orimprove application service quality. The 3GPP network can also securelyobtain related data from the third-party application, to enhance smartdecision-making of the network. In addition, the function entitysupports recovery of structured data from the UDR or storage ofstructured data in the UDR.

AF entity mainly supports interaction with the 3GPP network to provide aservice, for example, affecting data routing decision, a PCF, orproviding some services for a network side (where these services may beperformed by a third party (3rd party), or may not be performed by athird party).

PCF entity mainly supports providing of a unified policy framework tocontrol network behavior, and providing of a policy rule for a controllayer network function, and responsible for obtaining user subscriptioninformation related to policy decision.

UDR entity is mainly responsible for storing structured data. Storedcontent includes subscription data, policy data, externally exposedstructured data, and application-related data.

UDM entity is mainly configured to manage user subscription information.

It should be noted that the foregoing function entities are merelynames, and the names do not constitute any limitation on the entities.For example, the session management function entity may alternatively bereplaced with “session management function” or another name. The sessionmanagement function entity may also correspond to an entity thatincludes another function in addition to a session management function.The UPF entity may alternatively be replaced with “user plane function”or another name. The UPF entity may also correspond to an entity thatincludes another function in addition to a UPF. These descriptions areprovided herein, and are not provided below again.

A terminal accesses a network using a radio access network (RAN) deviceor an access network (AN) device. The RAN device is mainly a wirelessnetwork device in the 3GPP network, and the AN may be an access networkdevice defined in the non-3GPP.

In this application, the terminal may be user equipment (UE), a handheldterminal, a notebook computer, a subscriber unit, a cellular phone, asmartphone, a wireless data card, a personal digital assistant (PDA)computer, a tablet computer, a wireless modem, a handheld device, alaptop computer, a cordless phone, a wireless local loop (WLL) station,a machine type communication (MTC) terminal, or another device that canaccess a network.

The terminal may communicate with the RAN device using an air interfacetechnology. The RAN device is mainly responsible for functions on an airinterface side, such as radio resource management, QoS management, anddata compression and encryption. The access network may include a macrobase station, a micro base station (also referred to as a small cell), arelay station, an access point, and the like in various forms. Insystems that use different radio access technologies, names of a devicethat has a base station function may be different. For example, in along term evaluation (LTE) system, the device is referred to as anevolved NodeB (eNB), and in a 3rd generation (3G) system, the device isreferred to as a NodeB, or the like.

The AN device allows interconnection and interworking between theterminal and a 3GPP core network using a non-3GPP technology. Forexample, the non-3GPP technology is WI-FI, worldwide interoperabilityfor microwave access (wWiMAX), code division multiple access (CDMA), orthe like.

In this application, that a terminal is in an unavailable state meansthat a network initiates paging for the terminal but receives noresponse, the terminal is in a PSM mode, the terminal is in an MICOmode, and so on. In the PSM mode, the terminal is allowed to reduce anenergy loss, and cannot immediately be reachable to receive service datathat is sent to the terminal. In the MICO mode, only the terminal isallowed to initiate a connection. When the terminal is in this mode andthe terminal is in an idle state, a network considers that the terminalis unreachable.

In this application, a DDN failure may be that the network detects thatthe terminal is in an unavailable state, or a data priority (that is, anallocation and retention priority (ARP) for triggering DDN is not higherthan a previous data priority for triggering DDN.

In this application, a terminal event may be an event that various typesof statuses or information need to be obtained from a network. Forexample, the technical solutions of this application may be applied to ahigh-latency communication scenario, and the terminal event may be anevent of terminal availability after DDN failure. The applicationfunction entity providing a high-latency communication service cansupport service communication with a low latency requirement bysubscribing to an event of terminal availability after DDN failure. Theterminal event may be alternatively a terminal reachability event, orthe like. The application function entity installs a related applicationto provide a corresponding service. Subscription to a terminal event issubscribing to an event notification or modifying a subscribed eventusing a service operation.

It should be noted that the terms “system” and “network” may be usedinterchangeably in the embodiments of this application. “A plurality of”means two or more than two. In view of this, in the embodiments of thisapplication, “a plurality of” may also be understood as “at least two”.The term “and/or” describes a correlation relationship for describingassociated objects and represents that three relationships may exist.For example, A and/or B may represent the following three cases. Only Aexists, both A and B exist, and only B exists. In addition, thecharacter “/” generally indicates an “or” relationship between theassociated objects.

The embodiments of this application provide a communications method andapparatus. A terminal event is subscribed to from a session managementfunction entity that manages a specific service, when receiving aservice detection notification from a UPF entity, the session managementfunction entity instructs an AMF entity to monitor the terminal event.In this way, a terminal event may be subscribed to and monitored for aspecific service in a 5G architecture.

In this application, subscribing to a terminal event from a network,activating the terminal event, and performing terminal eventnotification mainly include two procedures.

(1) First, an application function entity having an applicationinstalled configures a terminal event for the network. There may be thefollowing several configuration methods. The AF configures an event fora UDM/PCF using an NEF, the AF configures an event for a UDR using thePCF, the AF configures an event for the UDR using the NEF, and so on.Detailed descriptions are provided below.

(2) The network activates the terminal event and notifies the terminalevent. The following provides descriptions using a detailedcommunications method procedure.

Specifically, FIG. 4 is a schematic flowchart for configuring, by anapplication function entity, subscription of a terminal event for anetwork according to an embodiment of this application. The method mayinclude the following steps.

S101. The application function entity sends a first message to a controlfunction entity. The control function entity receives the first messagefrom the application function entity. The first message is used tosubscribe to a terminal event, and the first message includes servicedescription information.

The first message further includes at least one of the followinginformation an identifier of a terminal corresponding to the terminalevent, event type information of the terminal event, a DNN, sliceinformation, and an application function service identifier.

S102. The control function entity allocates an event correlationidentifier of the terminal event.

S103. Send at least one of the service description information, theevent correlation identifier, the identifier of the terminal, an eventtype of the terminal event, the DNN, the slice information, and theapplication function service identifier to a unified data repositoryfunction entity for storage.

S104. The unified data repository function entity stores at least onepiece of the foregoing information.

5G is used as an example in this embodiment. For a service, when astatus of the terminal in a process of processing the service needs tobe monitored, the application function entity providing the service maysend a first message to the control function entity, where the firstmessage is used to subscribe to a terminal event from the network. Thecontrol function entity may be a UDM, a PCF, an NEF, or the like. Thecontrol function entity receives the first message.

In this embodiment, one or more application function entities maysubscribe to the terminal event from the network. The terminal eventsubscribed to by the plurality of application function entities maycorrespond to a same service or different services. For example, aplurality of application function entities may subscribe to a sameterminal event from a plurality of terminals, or a plurality ofapplication function entities may subscribe to different terminal eventsfrom a same terminal.

The first message carries the service description information. Theservice description information is used to indicate a servicecorresponding to the terminal event.

The service description information may be description information ofservice data. For example, the service description information may beany description information that can identify a service of a specificapplication function entity, such as an IP triplet (a destination IPaddress/IP version 6 (IPv6) prefix, a port number, an IP upper-layerprotocol number (such as a transmission protocol), an applicationidentifier (application ID), a non-IP descriptor, or Ethernet servicedescription information. The destination IP address may be a destinationIP version 4 (IPv4) address, a destination IPv6 prefix, or a destinationIPv6 address.

A related function entity may distinguish between the plurality ofapplication function entities based on the service descriptioninformation. In addition, the first message further includes at leastone of the following information the identifier of the terminalcorresponding to the terminal event, the event type information of theterminal event, the DNN, the slice information, and the applicationfunction service identifier (AF-service-ID).

The identifier of the terminal may be a user equipment identifier (UEID) of a single terminal, or may be a group identifier (group ID) of aplurality of terminals (that is, a group). The terminal identifier maybe an identifier used to identify a user, such as a generic public useridentifier (GPSI). The group identifier may be an external groupidentifier.

The terminal event may be an event that various types of statuses orinformation need to be obtained from the network, or the event type ofthe terminal event may be various defined terminal events. The eventtype information is used to identify the terminal event. For example,the technical solutions of this application may be applied to ahigh-latency communication scenario, and the event type of the terminalevent may be an event of terminal availability after DDN failure. Forthe event of terminal availability after DDN failure, when theapplication function entity sends a downlink data packet to the terminalthrough the network, if the terminal is in an unavailable state, thenetwork activates the event, and monitors a status of the terminal. Whenthe terminal enters an available state, the network reports theavailable state of the terminal to the application function entity usingthe control function entity. A third-party application can supportservice communication with a low latency requirement by subscribing tothe event of terminal availability after DDN failure. The event type ofthe terminal event may be alternatively a terminal reachability event,or the like. Alternatively, the event type of the terminal event may bea service detection event, and is used to notify a subscriber from anetwork when a service occurs. The event type information may berepresented using an index number of an event type that is specified ina protocol, and the event type information is pre-stored in a networkdevice and a terminal device.

The DNN is used to identify a data network accessed by a user. The sliceinformation may be a slice instance and/or S-NSSAI. The S-NSSAI or theslice instance is used to select a specific slice network, namely, anetwork element of a core network, such as an SMF and a UPF. TheAF-service-ID is an identifier of an application function service, and anetwork side may derive the DNN and the slice information based on theidentifier.

In addition, the first message may further include a notification targetaddress. The notification target address may be an NEF ID, an AF ID, oran AF address.

The control function entity receives the first message, and processesthe first message, including checking, according to a local policy,whether the application function entity is authorized to execute aservice request, whether the first message is valid, whether a quantityof times that the application function entity sends a request exceeds alimit or request frequency, and so on. If the check is passed, thecontrol function entity stores the foregoing information, and allocatesan event correlation identifier of the terminal event. The eventcorrelation identifier is used to identify a correlation relationshipbetween the terminal event and a function entity that subscribes to theterminal event. The event correlation identifier may also be referred toas a notification correlation ID. Alternatively, the event correlationidentifier may be a subscription correlation identifier, and thesubscription correlation identifier may be allocated by an AMF or theSMF.

In addition, the notification target address and the notificationcorrelation ID may be used jointly. The notification target address andthe notification correlation ID are used to correlate a notificationreceived from an event provider with a subscription. One subscription isrelated to one independent notification target address and anotification correlation ID.

In addition, if the control function entity is the NEF, and the UDM/PCFconfigures the terminal event for the network, the control functionentity may further send, to the UDM/PCF, a message of subscribing to theterminal event. The message includes service description information,and further includes at least one of the following information theidentifier of the terminal corresponding to the terminal event, theevent type information of the terminal event, the DNN, the sliceinformation, and the application function service identifier.

Further, that the control function entity checks whether the message isvalid includes checking whether the network supports event monitoring,whether the request is to be received, and so on. When the check ispassed, the control function entity stores the foregoing information.

Further, the control function entity may send the foregoing informationto the UDR, and the UDR stores all of the information.

Specifically, the control function entity sends any one or a combinationof any two, three, four, five, six, or seven of the service descriptioninformation, the event correlation identifier, the identifier of theterminal, the event type information of the terminal event, the DNN, theslice information, or the application function service identifier to theunified data repository function entity for storage.

The following are examples of the configuration.

EXAMPLE 1

An AF configures an event for a UDM/PCF using an NEF.

FIG. 5A is a schematic flowchart of an example of configuring, by an AF,subscription of a terminal event for a UDM/PCF using an NEF. The methodmay include the following steps.

S201. The AF determines to subscribe to an event of “terminalavailability after DDN failure” from a network side. The AF sends afirst message to the NEF, where the first message is used to subscribeto a terminal event. For example, in the system shown in FIG. 3A, themessage may be Nnef_EventExposure_subscribe. The subscription messageincludes the following information service description information, aterminal identifier (or a group identifier), an AF identifier, eventtype information, or a DNN/S-NSSAI/AF-service-ID.

S202. The NEF processes the message, including checking, according to alocal policy, whether the AF is authorized to execute the servicerequest, whether the message is valid, whether a quantity of times thatthe application function entity sends a request exceeds a limit orexceeds request frequency, and so on. If the check is passed, the NEFstores the following information the service description information,the terminal identifier (or the group identifier), the event typeinformation, and the DNN/S-NSSAI/AF-service-ID. In addition, the NEFallocates an event correlation identifier (for example, an NEF referenceID) of the terminal event. The event correlation identifier is used toidentify a correlation relationship between the terminal event and afunction entity that subscribes to the terminal event. The event typeinformation is used to identify the terminal event. Optionally, the NEFmay further store the following information the AF identifier or an AFaddress. Based on the AF identifier or the AF address, the AF may befound and a message may be sent to the AF.

S203. The NEF sends a second message to the UDM/PCF, where the secondmessage is used to subscribe to the terminal event. For example, in thesystem shown in FIG. 3A, the message may beNudm_EventExposure_subscribe/Npcf EventExposure_subscribe. Thesubscription message includes the following information servicedescription information, a terminal identifier (or a group identifier),event type information, an event correlation identifier, and aDNN/S-NSSAI/AF-service-ID. Optionally, the subscription message mayfurther include an AF identifier or an AF address. The event typeinformation is determined based on the event type information providedby the AF, and may indicate a same event type, or a new event typegenerated for supporting the event that is to be subscribed to by theAF.

In another embodiment, after receiving the event information from theAF, the NEF may send a message to the UDM and the PCF separately. Themessage sent to the UDM may include a terminal identifier (or a groupidentifier), event type information, and an event correlationidentifier. The message sent to the PCF includes the terminal identifier(or the group identifier), the event type information, the eventcorrelation identifier, service description information, and aDNN/S-NSSAI/AF-service-ID. The event type information is determinedbased on the event type information provided by the AF, and may indicatea same event type, or a new event type generated for supporting theevent that is to be subscribed to by the AF. Optionally, the NEF may mapthe AF-service-ID to the DNN/S-NSSAI. In this case, stored informationis the DNN/S-NSSAI.

S204. The UDM/PCF checks whether the message is valid, includingchecking whether a network supports event monitoring, whether therequest is to be received, and so on. When the check is passed, theUDM/PCF stores the service description information, the terminalidentifier (or the group identifier), the AF identifier, the event typeinformation, the event correlation identifier, and theDNN/S-NSSAI/AF-service-ID. If the NEF can send the second message to theUDM and the PCF separately, information stored in the UDM is theterminal identifier (or the group identifier), the AF identifier, theevent type information, and the event correlation identifier. The PCFstores the service description information, the terminal identifier (orthe group identifier), the AF identifier, the event type information,the event correlation identifier, and the DNN/S-NSSAI. Optionally, theUDM may map the AF-service-ID to the DNN/S-NSSAI. In this case, storedinformation is the DNN/S-NSSAI.

S205. Further, optionally, the UDM/PCF may send a third message to aUDR, where the third message is used to subscribe to the terminal event.For example, in the system shown in FIG. 3A, the message may beNudr_EventExposure_subscribe. The UDR stores the foregoing informationfor subscribing to the terminal event.

EXAMPLE 2

An AF configures an event for a UDR using a PCF.

FIG. 5B is a schematic flowchart of an example of configuring, by an AF,subscription of a terminal event for a UDR using a PCF. The method mayinclude the following steps.

S301. The AF determines to subscribe to an event of “terminalavailability after DDN failure” from a network side. The AF sends afirst message to the PCF, where the first message is used to subscribeto a terminal event. For example, in the system shown in FIG. 3A, themessage may be Npcf_EventExposure_subscribe. The subscription messageincludes the following information service description information, aterminal identifier (or a group identifier), an AF identifier, eventtype information, and a DNN/S-NSSAI/AF-service-ID.

S302. The PCF processes the message, including checking, according to alocal policy, whether the AF is authorized to execute the servicerequest, whether the message is valid, whether a quantity of times thatthe application function entity sends a request exceeds a limit orexceeds request frequency, and so on. If the check is passed, the PCFstores the following information the service description information,the terminal identifier (or the group identifier), the event typeinformation, and the DNN/S-NSSAI/AF-service-ID. In addition, the PCFallocates an event correlation identifier (for example, a PCF referenceID) corresponding to the terminal event. The event correlationidentifier is used to identify a correlation relationship between theterminal event and a function entity that subscribes to the terminalevent. The event type information is used to identify the terminalevent. Optionally, the subscription message may further include the AFidentifier or an AF address.

S303. Further, optionally, the PCF sends a second message to the UDR,where the second message is used to subscribe to the terminal event. Forexample, in the system shown in FIG. 3A, the message may beNudr_EventExposure_subscribe. The message includes the followinginformation service description information, a terminal identifier or agroup identifier, event type information, a PCF reference ID, and aDNN/S-NSSAI/AF-service-ID. The subscription message may further includean AF identifier or an AF address.

S304. Optionally, the UDR checks whether the message is valid, includingchecking whether a network supports event monitoring, whether therequest is to be received, and so on. When the check is passed, the UDRstores the following information the service description information,the terminal identifier or the group identifier, the event typeinformation, the PCF reference ID, and the DNN/S-NSSAI/AF-service-ID.The UDR may further store the AF identifier or the AF address.

EXAMPLE 3

An AF configures an event for a UDR using an NEF.

FIG. 5C is a schematic flowchart of an example of configuring, by an AF,subscription of a terminal event for a UDR using an NEF. The method mayinclude the following steps.

S401. The AF determines to subscribe to an event of “terminalavailability after DDN failure” from a network side. The AF sends afirst message to the NEF, where the first message is used to subscribeto a terminal event. For example, in the system shown in FIG. 3A, themessage may be Nnef_EventExposure_subscribe. The message includes thefollowing information service description information, a terminalidentifier or a group identifier, an AF identifier, event typeinformation, and a DNN/S-NSSAI/AF-service-ID.

S402. The NEF processes the message, including checking, according to alocal policy, whether the AF is authorized to execute the servicerequest, whether the message is valid, whether a quantity of times thatthe application function entity sends a request exceeds a limit orexceeds request frequency, and so on. If the check is passed, the NEFstores the following information the service description information,the terminal identifier or the group identifier, the event typeinformation, and the DNN/S-NSSAI/AF-service-ID. In addition, the NEFallocates an event correlation identifier (for example, an NEF referenceID) of the terminal event. The event correlation identifier is used toidentify a correlation relationship between the terminal event and afunction entity that subscribes to the terminal event. The event typeinformation is used to identify the terminal event. The NEF may furtherstore an AF identifier or an AF address.

S403. The NEF sends a second message to the UDR, where the secondmessage is used to subscribe to the terminal event. For example, in thesystem shown in FIG. 3A, the message may be Nudr_EventExposure_sbscribe.The message includes the following information service descriptioninformation, a terminal identifier or a group identifier, event typeinformation, an NEF reference ID, and a DNN/S-NSSAI/AF-service-ID. Themessage may further include an AF identifier or an AF address. The eventtype information is determined based on the event type informationprovided by the AF, and may indicate a same event type, or a new eventtype generated for supporting the event that is to be subscribed to bythe AF. Further, optionally, the NEF may generate a plurality of eventsbased on event information sent by the AF, and store the plurality ofevents in the UDR.

Optionally, the UDR checks whether the message is valid, includingchecking whether a network supports event monitoring, whether therequest is to be received, and so on. When the check is passed, the UDRstores the following information the service description information,the terminal identifier (or the group identifier), the event typeinformation, the NEF reference ID, and the DNN/S-NSSAI/AF-service-ID.The UDR may further store the AF identifier or the AF address.

According to the method in which the application function entityconfigures, for the network, the subscribed terminal event provided inthis embodiment of this application, if a terminal event needs to besubscribed to for a service, the application function entity subscribesto the terminal event from the control function entity in the 5Gnetwork. Specifically, when the service is executed, the controlfunction entity subscribes to the terminal event from a specific sessionmanagement function entity. In this way, a terminal event may besubscribed to and monitored in a 5G architecture.

The following describes in detail a procedure of activating a terminalevent and notifying the terminal event by a network.

FIG. 6A is a schematic flowchart of a communications method according toan embodiment of this application. The method may include the followingsteps.

S501. A control function entity determines a session management functionentity based on at least one of a DNN, slice information, and anapplication function service identifier.

Specifically, that a control function entity determines a sessionmanagement function entity based on at least one of a DNN, sliceinformation, and an application function service identifier may be thecontrol function entity determines the session management functionentity based on the DNN, based on the slice information, based on theapplication function service identifier, based on the DNN and the sliceinformation, based on the DNN and the application function serviceidentifier, based on the slice information and the application functionservice identifier, or based on the DNN, the slice information, and theapplication function service identifier.

S502. The control function entity sends a first message to the sessionmanagement function entity. The first message is used to subscribe to aterminal event, the first message includes service descriptioninformation, and the service description information is used to indicatea service corresponding to the terminal event.

S503. The session management function entity sends a second message to aUPF entity. The second message is used to instruct the UPF entity todetect a service. The service is the service corresponding to thesubscribed terminal event. In addition, in another implementation, thesecond message may be a service information request, and is used toinstruct the UPF entity to report service information. In this case,S504 does not need to be performed. The service information may be atleast one of a source IP address and a source port number of a downlinkdata packet, or may be index information, where the index information isused to index a specific event. The downlink data packet may be adiscarded downlink data packet. Optionally, in case of a DDN failure,the session management function entity sends the service informationrequest to the UPF entity.

S504. Optionally, when the received second message is used to instructthe UPF entity to detect a service, the UPF entity detects the service.

S505. The UPF entity sends a service detection notification to thesession management function entity. The service detection notificationis used to indicate occurrence of service data. The session managementfunction entity receives the service detection notification. In anotherimplementation, the service detection notification may be serviceinformation, that is, the service information in S503. The serviceinformation is determined based on the downlink data packet, andfurther, is determined based on a packet header of the received downlinkdata packet. For example, when the downlink data packet is an IP datapacket, a packet header of the downlink data packet includes IPquintuple information, when the downlink data packet is an Ethernet datapacket, a packet header of the downlink data packet includes a mediaaccess control (MAC) address.

S506. In response to the service detection notification, the sessionmanagement function entity sends a notification that is for monitoringthe terminal event to an AMF entity. Optionally, the notification thatis for monitoring the terminal event may include event correlationinformation, for example, an event correlation identifier (an NEFreference ID). The event correlation information is used to determineevent reporting information. Optionally, the session management functionentity sends the event correlation information to the MME based on theservice description information and the service information. In otherwords, the session management function entity compares the serviceinformation with the service description information, and sends theevent correlation information to the MME when the service informationmatches the service description information.

S507. The AMF entity monitors the subscribed terminal event.

S508. When detecting the terminal event, the AMF entity sends a terminalevent notification to a function entity that subscribes to the terminalevent. The terminal event notification includes at least one of thefollowing information an identifier of a terminal corresponding to theterminal event and an event correlation identifier of the terminalevent, where the event correlation identifier is used to identify acorrelation relationship between the terminal event and the functionentity that subscribes to the terminal event. The function entity thatsubscribes to the terminal event receives the terminal eventnotification.

5G is still used as an example in this embodiment. Based on theforegoing descriptions, if an AF intends to subscribe to a terminalevent from a network, the AF configures subscription of the terminalevent for the control function entity. The control function entity or aUDR stores an identifier of a terminal corresponding to the terminalevent, event type information of the terminal event, a DNN, sliceinformation, an application function service identifier, servicedescription information, and an event correlation identifier.

When a session is set up, the control function entity (for example, theUDM/PCF) receives a correlation request sent by the SMF, where thecorrelation request is used to request to perform event subscription ona service corresponding to the session. The request may include a DNN,slice information, or an AF-service-ID. The control function entityobtains, locally or from the UDR, the DNN of the terminal eventconfigured in the foregoing configuration procedure. The controlfunction entity determines that the DNN included in the correlationrequest is consistent with the DNN of the terminal event configured inthe foregoing configuration procedure. Alternatively, the controlfunction entity obtains, locally or from the UDR, the slice informationof the terminal event configured in the foregoing configurationprocedure, and determines that the slice information used in thecorrelation request is consistent with the slice information configuredin the foregoing configuration procedure (if the request includes theAF-service-ID, the DNN and the slice information may also be deducedusing the AF-service-ID). In this case, the control function entitydetermines the SMF that sends the correlation request, and then sendsthe first message to the SMF, where the first message is used tosubscribe to the terminal event.

Alternatively, after a session is set up, the control function entityreceives the terminal event subscribed to by the AF, and determines asession that has a corresponding DNN and corresponding sliceinformation. The control function entity determines the SMF that iscorrelated with the session corresponding to the DNN and the sliceinformation, and may also actively send the first message to the SMF, tosubscribe to the terminal event.

The first message includes the service description information. Theservice description information is used to indicate the servicecorresponding to the terminal event, and may be further used todetermine the application function entity that provides a service forthe terminal.

In addition, the first message may further include the event correlationidentifier and the event type information of the terminal event. Theevent correlation identifier is used to identify the correlationrelationship between the terminal event and the function entity thatsubscribes to the terminal event, and the event type information is usedto identify the terminal event. The event correlation identifier may bea reference ID generated by the control function entity in the foregoingconfiguration process. The reference ID is correlated with the AF ID.The terminal event may be an event that various types of statuses orinformation need to be obtained from the network, or the event type ofthe terminal event may be various defined terminal events. For example,the event type of the terminal event includes an event of terminalavailability after DDN failure, a terminal reachability event, and thelike. Further, the event type may be represented by an event ID. Theevent ID indicates a type of an event that is being subscribed to, forexample, availability after DDN failure.

The SMF receives the first message, and sends the second message to theUPF. The second message is used to instruct the UPF to detect a service.The service is the service corresponding to the subscribed terminalevent, that is, a service corresponding to the service descriptioninformation. The second message may include a corresponding ruledelivered by the SMF to the UPF, and the UPF detects the service databased on the rule.

The UPF receives downlink data sent by a data network, and detects,according to a packet detection rule (PDR), for example, a packet filteror an indicator, the service corresponding to the subscribed terminalevent. The packet detection rule includes the service descriptioninformation, for example, an IP triplet.

For example, the rule may be that when the UPF does not store accessnetwork tunnel information of the session, the UPF needs to establish auser plane tunnel to send the downlink data to the terminal. In thiscase, the UPF sends the service detection notification to the SMF. Theservice detection notification is used to indicate occurrence of theservice data. The service data is service data corresponding to theservice description information.

In addition, in this embodiment, the service description information maybe represented by event filter information. The event filter informationis used to determine a condition of matching a notification event. Theevent filter information includes an event parameter type (eventparameter types) and an event parameter value (event parametervalue(s)). The event parameter type may be the service descriptioninformation. The event parameter value may be specific servicedescription information, such as an IP triplet or an application ID.

The SMF receives the service detection notification, and in response tothe service detection notification, sends the notification that is formonitoring the terminal event to the AMF.

The AMF detects a status of the terminal.

An example in which the terminal event is an event of terminalavailability after DDN failure is used. If detecting that the terminalis in an unavailable state, the AMF or the SMF activates the terminalevent, and monitors the subscribed terminal event. That the terminal isin an unavailable state means that the network initiates paging for theterminal but receives no response, the terminal is in a PSM mode, or theterminal is in an MICO mode.

When the AMF detects that the terminal is connected to the network, forexample, the terminal initiates a tracking area update (TAU) request ora service request, the AMF sends the terminal event notification to thefunction entity that subscribes to the terminal event. The terminalevent notification includes at least one of the following informationthe identifier of the terminal corresponding to the terminal event andthe event correlation identifier of the terminal event, where the eventcorrelation identifier is used to identify the correlation relationshipbetween the terminal event and the function entity that subscribes tothe terminal event. The function entity that subscribes to the terminalevent receives the terminal event notification.

If one AF subscribes to a same terminal event from a plurality ofterminals, the AF that subscribes to the terminal event may bedistinguished based on an identifier of a terminal in a terminal eventnotification. If a plurality of AFs subscribe to a plurality of terminalevents from a same terminal, the AFs that subscribe to the terminalevents may be distinguished from each other based on event correlationidentifiers in terminal event notifications. If a plurality of AFssubscribe to a plurality of terminal events from a plurality ofterminals, the AFs that subscribe to the terminal events may bedistinguished from each other based on identifiers of the terminals andevent correlation identifiers that are in terminal event notifications.Therefore, one or more application function entities may provide aservice for a terminal. When subscribing to a terminal event, servicedescription information is used to indicate the service corresponding tothe terminal event such that the application function entities thatsubscribe to the terminal event can be distinguished from each other.

The function entity that subscribes to the terminal event may be theSMF, the AF, or the NEF.

If the event type of the terminal event is an event of terminalavailability after DDN failure, after receiving the terminal eventnotification (notifying that the terminal is available), the AF mayresend the downlink data to the terminal.

The event reporting information may be used to identify informationabout a reported event. In this embodiment, the event reportinginformation may be used to describe the event of availability after DDNfailure reported by the AMF or the SMF.

FIG. 6B is a schematic flowchart of a communications method according toan embodiment of this application. The method may include the followingsteps.

S501′. A control function entity determines a session managementfunction entity based on at least one of a DNN, slice information, andan application function service identifier.

Specifically, that a control function entity determines a sessionmanagement function entity based on at least one of a DNN, sliceinformation, and an application function service identifier may be thecontrol function entity determines the session management functionentity based on the DNN, based on the slice information, based on theapplication function service identifier, based on the DNN and the sliceinformation, based on the DNN and the application function serviceidentifier, based on the slice information and the application functionservice identifier, or based on the DNN, the slice information, and theapplication function service identifier.

S502′. The control function entity sends a first message to the sessionmanagement function entity. The first message is used to subscribe to aterminal event, the first message includes service descriptioninformation, and the service description information is used to indicatea service corresponding to the terminal event.

S503′. The session management function entity sends a second message toa UPF entity. The second message is used to instruct the UPF entity todetect a service. The service is the service corresponding to thesubscribed terminal event. In addition, in another implementation, thesecond message may be a service information request, and is used toinstruct the UPF entity to report service information. In this case,S504′ does not need to be performed. The service information may be atleast one of a source IP address and a source port number of a downlinkdata packet, or may be index information, where the index information isused to index a specific event. The downlink data packet may be adiscarded downlink data packet. Optionally, in case of a DDN failure,the session management function entity sends the service informationrequest to the UPF entity.

S504′. Optionally, when the received second message is used to instructthe UPF entity to detect a service, the UPF entity detects the service.

S505′. The UPF entity sends a service detection notification to thesession management function entity. The service detection notificationis used to indicate occurrence of service data. The session managementfunction entity receives the service detection notification. In anotherimplementation, the service detection notification may be serviceinformation, that is, the service information in S503′. The serviceinformation is determined based on the downlink data packet, andfurther, is determined based on a packet header of the received downlinkdata packet. For example, when the downlink data packet is an IP datapacket, a packet header of the downlink data packet includes IPquintuple information, when the downlink data packet is an Ethernet datapacket, a packet header of the downlink data packet includes a MACaddress.

For implementation of the foregoing steps, respectively refer to stepS501 to S505 in the embodiment shown in FIG. 6A. Details are notdescribed herein again.

S506′. The session management function entity sends a terminal serviceoccurrence notification to a network exposure function entity inresponse to the service detection notification.

In the foregoing steps, the session management function entity receivessubscription of the terminal event from the control function entity. Inthis case, after receiving the service detection notification sent bythe UPF entity and determining that a terminal is unreachable, thesession management function entity sends the terminal service occurrencenotification to the NEF.

S507′. When receiving a terminal reachability notification, the networkexposure function entity sends a terminal event notification to afunction entity that subscribes to the terminal event. The terminalevent notification includes at least one of the following information anidentifier of a terminal corresponding to the terminal event and anevent correlation identifier of the terminal event, where the eventcorrelation identifier is used to identify a correlation relationshipbetween the terminal event and the function entity that subscribes tothe terminal event. The function entity that subscribes to the terminalevent receives the terminal event notification.

Because NEF has received the terminal service occurrence notificationfrom the SMF previously, when the NEF receives the terminal reachabilitynotification sent by the AMF, the NEF sends the terminal eventnotification to an AF. According to the communications method providedin this embodiment of this application, the SMF receives subscription ofthe terminal event, notifies the NEF when the terminal is unreachable,and sends the terminal event notification to the AF when the NEFreceives the terminal reachability notification that is sent by the AMF.In this way, a terminal event may be subscribed to and notified of for aspecific service in a 5G architecture.

FIG. 6C and FIG. 6D are a schematic flowchart of a specific example ofperforming terminal event notification by an NEF.

S501″. A UDM/PCF determines a target SMF based on aDNN/S-NSSAI/AF-service-ID, and subscribes to a terminal event from theSMF and an AMF.

The DNN/S-NSSAI/AF-service-ID may be obtained from a UDR or may belocally stored.

The UDM or the PCF may subscribe to the terminal event from the AMF andthe SMF in the following two manners.

Method 1. The UDM or the PCF sends an event 1 (for example, an event ofUE availability after DDN failure) and an event correlation identifierto the AMF, and sends an event 2 (for example, a service detectionevent), an event correlation identifier, and service descriptioninformation to the SMF.

Method 2. The UDM sends an event 1 (for example, an event of UEavailability after DDN failure) and an event correlation identifier tothe AMF, and the PCF sends an event 2 (for example, a service detectionevent), an event correlation identifier, service description informationto the SMF.

S502 a″. The UDM/PCF sends a first message to the AMF.

S502 b″. The UDM/PCF sends a second message (for example,Nsmf_EventExposure) to the target SMF.

The second message includes service description information, event typeinformation, and an event correlation identifier (for example, an NEFreference ID), and may further include information such as an NEF ID. Inthis example, an event type is a service detection event.

The SMF/AMF receives the first message.

Specifically, after receiving the service detection event and theservice description information, the SMF correlates the servicedetection event with the service description information. If the two aresent together (sent in a same message), it indicates that the two arecorrelated with each other. Alternatively, if the service descriptioninformation is sent in a service detection event subscription message,it indicates that the two are correlated with each other.

S503″. The SMF sends a service detection message to a UPF in a procedurefor setting up or modifying an N4 session. The service detection messageincludes the service description information.

Specifically, when receiving, from the UPF, a notification that datacorresponding to the service description information is detected, theSMF may determine an event to which the data corresponds triggers theevent, and therefore send the event correlation identifier to thecorresponding NEF.

The UPF detects a corresponding service based on the service detectionmessage, that is, detects a service corresponding to the servicedescription information.

In addition, in another implementation, the service detection messagemay be a service information request used to instruct the UPF entity toreport service information. The service information may be at least oneof a source IP address and a source port number of a downlink datapacket, or may be index information, where the index information is usedto index a specific event. The downlink data packet may be a discardeddownlink data packet. Optionally, in case of a DDN failure, the sessionmanagement function entity sends the service information request to theUPF entity.

S504″. The AMF sends UE unreachability information to the SMF.

The AMF may send the UE unreachability information to the SMF whenreceiving service data sent by another AF and detecting that UE isunreachable. Alternatively, the AMF sends the UE unreachabilityinformation to the SMF when receiving service data sent by an AF anddetecting a DDN failure.

Optionally, S504″ may be any step before S506″.

S505″. The AF sends a downlink data packet to the terminal.

S506″. The UPF sends a service detection notification to the SMF.

The UPF detects, according to a packet detection rule, that the downlinkdata packet is a service corresponding to the subscribed terminal event.

When the UPF does not store access tunnel information of the session, auser plane tunnel needs to be established, and the UPF sends the servicedetection notification to the SMF. The service detection notification isused to indicate that occurrence of the service data is detected.

Specifically, the service corresponding to the subscribed terminal eventis the service corresponding to the service description information. Thepacket detection rule includes the service description information. Forexample, the service description information is an IP quintuple, and theUPF detects the received downlink data packet based on the IP quintuple.When the downlink data packet corresponding to the IP quintuple isdetected, it is determined that occurrence of the service data isdetected.

In another implementation, the service detection notification may beservice information, that is, the service information in S503″. Theservice information is determined based on the downlink data packet, andfurther, is determined based on a packet header of the received downlinkdata packet. For example, when the downlink data packet is an IP datapacket, a packet header of the downlink data packet includes IPquintuple information, when the downlink data packet is an Ethernet datapacket, a packet header of the downlink data packet includes a MACaddress.

S507″. The SMF sends an event notification to the NEF.

Specifically, the SMF notifies the NEF that a terminal service occurs.

S508 a″. If the SMF reports an event to the NEF when the UE isunreachable, this step is performed, and the NEF records the event.

S508 b″. If the SMF reports an event to the NEF when detecting a serviceat any time, the NEF records the event, and the NEF determines that theUE is unreachable.

S509″. The terminal initiates a connection to a network.

For example, the terminal initiates a TAU request or a service requestto the network.

S510″. The AMF sends a UE reachability event notification to the NEF.

S511″. The NEF sends a UE terminal event notification to the AF.

Specifically, corresponding to S508 a″, when the UE reachability eventis received, the event is sent to the AF based on a record. For example,the UE reachability event is sent to an AF of the recorded eventcorresponding to the service.

Corresponding to S508 b″, the record is deleted when the UE isreachable. If the UE is unreachable, a record is stored, when the UEreachability event is received, the event is sent to the AF based on therecord. For example, the UE reachability event is sent to an AF of therecorded event corresponding to the service.

The following further describes examples of the foregoing communicationsmethod in detail with reference to specific communication scenarios.

EXAMPLE 1

An AMF receives subscription of a terminal event from an SMF, andperforms event monitoring and notification.

FIG. 7A and FIG. 7B are a schematic flowchart of an example of acommunications method. In this example, an SMF instructs an AMF tomonitor a terminal event. Specifically, during or after session setup, aUDM/PCF performs the following procedure.

S601. The UDM/PCF determines a target SMF based on aDNN/S-NSSAI/AF-service-ID. The DNN/S-NSSAI/AF-service-ID may be obtainedfrom a UDR or may be locally stored.

S602. The UDM/PCF sends a first message (for example,Nsmf_EventExposure) to the target SMF. The first message includesservice description information, event type information, and an eventcorrelation identifier (for example, an NEF reference ID), and mayfurther include information such as an NEF ID. In this example, an eventtype is an event of terminal availability after DDN failure.

The SMF receives the first message.

Specifically, after the SMF receives the event of availability after DDNfailure and the service description information, the SMF correlates theevent of availability after DDN failure with the service descriptioninformation. If the two are sent together (sent in a same message), itindicates that the two are correlated with each other. Alternatively, ifthe service description information is sent in a subscription message onthe event of availability after DDN failure, it indicates that the twoare correlated with each other.

S603. The SMF sends a service detection message to a UPF in a procedurefor setting up or modifying an N4 session. The service detection messageincludes service description information.

Specifically, when receiving, from the UPF, a notification that datacorresponding to the service description information is detected, theSMF may determine an event to which the data corresponds triggers theevent, and therefore send the event correlation identifier to thecorresponding AMF. In addition, in another implementation, the servicedetection message may be a service information request used to instructthe UPF entity to report service information. In this case, S605 doesnot need to be performed. The service information may be at least one ofa source IP address and a source port number of a downlink data packet,or may be index information, where the index information is used toindex a specific event. The downlink data packet may be a discardeddownlink data packet. Optionally, in case of a DDN failure, the sessionmanagement function entity sends the service information request to theUPF entity.

The UPF detects a corresponding service based on the service detectionmessage, that is, detects a service corresponding to the servicedescription information.

S604. An AF sends a downlink data packet to a terminal.

S605. Optionally, when the received service detection message is used toinstruct the UPF entity to detect a service, the UPF detects, accordingto a packet detection rule, that the downlink data packet is a servicecorresponding to the subscribed terminal event.

When the UPF does not store access tunnel information of the session, auser plane tunnel needs to be established, and the UPF sends a servicedetection notification to the SMF. The service detection notification isused to indicate that occurrence of the service data is detected.

Specifically, the service corresponding to the subscribed terminal eventis the service corresponding to the service description information. Thepacket detection rule includes the service description information. Forexample, the service description information is an IP triplet, and theUPF detects the received downlink data packet based on the IP triplet.When the downlink data packet corresponding to the IP triplet isdetected, it is determined that occurrence of the service data isdetected.

S606. The SMF sends a second message (for example,Namf_CommunicationN1N2MessageTransfer) to the AMF in response to theservice detection notification sent by the UPF. The second messageincludes event type information and an event correlation identifier (forexample, an NEF reference ID), and may further include an NEF ID. TheNEF ID is used by the AMF to send a notification to an NEF correspondingto the NEF ID.

As an alternative of S606, the event type information and the eventcorrelation identifier may be carried in different messages. Forexample, the SMF may add the NEF reference ID toNamf_CommunicationN1N2MessageTransfer, and add the event typeinformation to Namf_EventExposure_Subscribe. In addition, an order ofsending the two messages is not limited. In another implementation, theservice detection notification may be service information, that is, theservice information in S603. The service information is determined basedon the downlink data packet, and further, is determined based on apacket header of the received downlink data packet. For example, whenthe downlink data packet is an IP data packet, a packet header of thedownlink data packet includes IP quintuple information, when thedownlink data packet is an Ethernet data packet, a packet header of thedownlink data packet includes a MAC address.

S607. When the AMF detects that the terminal is unavailable, the AMFsends a response message (for example,Namf_CommunicationN1N2MessageTransfer) to the SMF, to notify the SMF ofa DDN failure.

S608. The SMF further sends a DDN failure indication to the UPF.

S609. When the AMF determines that the terminal is unavailable, the AMFsets or activates an event of availability after DDN failure, and theAMF starts to monitor an availability state of the terminal.

S610. The terminal initiates a connection to a network. For example, theterminal initiates a TAU request or a service request to the network.

S611. If determining that the event of availability after DDN failure islocally set, the AMF sends a terminal event notification (for example,Namf_EventExposure_Notify) to the NEF. The terminal event notificationincludes at least one of the following information an identifier of theterminal and an event correlation identifier (for example, an NEFreference ID).

S5612. The NEF sends the terminal event notification (for example,Namf_EventExposure_Notify) to the AF based on the identifier of theterminal and/or the NEF reference ID.

After receiving the terminal event notification, the AF determines thatthe terminal is available, and may resend downlink data to the terminal.

EXAMPLE 2

An SMF performs event monitoring and notification.

FIG. 7C and FIG. 7D are a schematic flowchart of another example of acommunications method. Different from the example shown in 7A, in thisexample, an AMF monitors a terminal reachability event, and sends aterminal reachability notification to a session management functionentity when detecting that a terminal is reachable, where thenotification is used to instruct the SMF to monitor an event of terminalavailability after DDN failure. Specifically, during or after sessionsetup, a UDM/PCF performs the following procedure.

S701. The UDM/PCF determines a target SMF based on aDNN/S-NSSAI/AF-service-ID. The DNN/S-NSSAI/AF-service-ID is obtainedfrom a UDR or is locally stored.

S702. The UDM/PCF sends a first message (for example,Nsmf_EventExposure) to the target SMF. The first message includesservice description information, event type information, and an eventcorrelation identifier (for example, an NEF reference ID), and mayfurther include information such as an NEF ID. In this example, theevent type is an event of terminal availability after DDN failure.

S703. The SMF sends a service detection message to a UPF in a procedurefor setting up or modifying an N4 session. The service detection messageis used to instruct the UPF to detect a service corresponding to asubscribed terminal event, that is, a service corresponding to theservice description information. In addition, in another implementation,the service detection message may be a service information request usedto instruct the UPF entity to report service information. In this case,S705 does not need to be performed. The service information may be atleast one of a source IP address and a source port number of a downlinkdata packet, or may be index information, where the index information isused to index a specific event. The downlink data packet may be adiscarded downlink data packet. Optionally, in case of a DDN failure,the session management function entity sends the service informationrequest to the UPF entity.

S704. An AF sends a downlink data packet to the terminal.

S705. Optionally, when the received service detection message is used toinstruct the UPF entity to detect a service, the UPF determines,according to a packet detection rule, that the downlink data packet is aservice corresponding to the subscribed terminal event. When a userplane tunnel needs to be established, the UPF sends a service detectionnotification to the SMF. The service detection notification is used toindicate that occurrence of service data is detected.

S706. The SMF sends a second message (for example,Namf_CommunicationN1N2MessageTransfer) to the AMF in response to theservice detection notification sent by the UPF. The second message isused to subscribe to the terminal event, and the second message includesevent type information. The event type is a terminal reachability event.

S707. If detecting that the terminal is unreachable, the AMF sends aresponse message (for example, Namf_CommunicationN1N2MessageTransfer) tothe SMF. The response message is used to indicate that the terminal isunreachable.

S708. The SMF further sends a DDN failure indication to the UPF.

S709. The AMF activates the terminal reachability event.

S710. When the SMF determines that the terminal is unavailable (forexample, the terminal is in a PSM state, or the terminal is in an MICOstatus), the SMF sets an event of availability after DDN failure.

The terminal initiates a connection to a network. For example, theterminal initiates a TAU request or a service request to the network.

S711. If determining that the SMF subscribes to a terminal reachabilityreporting event, the AMF sends a first terminal event notification (forexample, Namf_EventExposure_Notify) to the SMF. The first terminal eventnotification is used to notify that the terminal is reachable.

S712 a. After determining that the event of availability after DDNfailure is set, the SMF sends a second terminal event notification to anNEF. The second terminal event notification includes at least one of thefollowing information an identifier of the terminal and an eventcorrelation identifier of the terminal event.

S713. The NEF sends the second terminal event notification to the AFbased on the identifier of the terminal and/or the event correlationidentifier.

As an alternative of S712 a and S713, S712 b that the SMF may send asecond terminal event notification to the AF may be alternativelyperformed. The second terminal event notification includes at least oneof the following information an AF identifier, an identifier of theterminal, and an event correlation identifier of the terminal event.

After receiving the terminal event notification, the AF determines thatthe terminal is available, and may resend downlink data to the terminal.

EXAMPLE 3

An SMF detects a service, and an AMF receives subscription of a terminalevent from a UDM/PCF, and performs event detection and notification.

FIG. 7E and FIG. 7F are a schematic flowchart of still another exampleof a communications method. A specific procedure is described asfollows.

S801. A UDM/PCF (SMF-PCF) determines a target SMF based on aDNN/S-NSSAI/AF-service-ID. The DNN/S-NSSAI/AF-service-ID is obtainedfrom a UDR or is locally stored. Further, a UDM/PCF (AMF-PCF) determinesan AMF based on an identifier of UE.

S802. The UDM/PCF (AMF-PCF) sends a first message (for example,Nsmf_EventExposure) to the AMF in a registration process of the UE or atany other time at which the terminal is in a registration state. Thefirst message includes event type information and an event correlationidentifier (for example, an NEF reference ID), and may further includean NEF ID. In this example, an event type is an event of terminalavailability after DDN failure.

During or after session setup, the UDM/PCF (SMF-PCF) sends a secondmessage (for example, Nsmf_EventExposure service message) to the targetSMF. The second message includes service description information and anevent correlation identifier (for example, an NEF reference ID).

The AMF-PCF is a PCF correlated with the AMF, and is configured toprovide the AMF with a policy related to access and mobility and aterminal policy. The SMF-PCF is a PCF correlated with the SMF, and isconfigured to provide a session-related policy to the SMF. The AMF-PCFand the SMF-PCF may be a same function entity, or may be independentfunction entities.

S803. The SMF sends a service detection message to a UPF in a procedurefor setting up or modifying an N4 session. The service detection messageis used to instruct the UPF to detect a service corresponding to asubscribed terminal event, that is, a service corresponding to theservice description information. In addition, in another implementation,the service detection message may be a service information request usedto instruct the UPF entity to report service information. In this case,S805 does not need to be performed. The service information may be atleast one of a source IP address and a source port number of a downlinkdata packet, or may be index information, where the index information isused to index a specific event. The downlink data packet may be adiscarded downlink data packet. Optionally, in case of a DDN failure,the session management function entity sends the service informationrequest to the UPF entity.

S804. An AF sends a downlink data packet to the terminal.

S805. Optionally, when the received second message is used to instructthe UPF entity to detect a service, the UPF receives the downlink datapacket, and determines, according to a packet detection rule, that thedownlink data packet is a service corresponding to the subscribedterminal event. When a user plane tunnel needs to be established, theUPF sends a DDN to the SMF. The DDN is used to indicate occurrence ofservice data. In another implementation, the DDN may be serviceinformation, that is, the service information in S803. The serviceinformation is determined based on the downlink data packet, andfurther, is determined based on a packet header of the received downlinkdata packet. For example, when the downlink data packet is an IP datapacket, a packet header of the downlink data packet includes IPquintuple information, when the downlink data packet is an Ethernet datapacket, a packet header of the downlink data packet includes a MACaddress.

S806. The SMF sends a third message (for example,Namf_CommunicationN1N2MessageTransfer) to the AMF in response to aservice detection notification sent by the UPF. The third messageincludes an NEF reference ID, and may further include an NEF ID. Itshould be noted that, in this embodiment, the SMF activates, using thethird message, the AMF to monitor the terminal event. In this case, theSMF instructs the AMF to start to monitor the terminal event, and theUDM/PCF has configured, using the first message, the AMF to monitor theterminal event. That is, configuring terminal event monitoring anddetecting the service corresponding to the service descriptioninformation may be independent processes, and may be indicated indifferent messages. Optionally, the third message may include eventcorrelation information, for example, an event correlation identifier.The event correlation information is used to determine event reportinginformation. Optionally, the session management function entity sendsthe event correlation information to the MME based on the servicedescription information and the service information. In other words, thesession management function entity compares the service information withthe service description information, and sends the event correlationinformation to the MME when the service information matches the servicedescription information.

In the foregoing procedure, an event subscription message and an eventmonitoring notification are sent by different function entities or bythe SMF. The AMF first receives subscription information of the event ofavailability after DDN failure, and then the AMF receives an eventmonitoring notification, where the event monitoring notificationincludes the NEF reference ID. In this case, the AMF may correlate themonitoring notification with the event.

S807. When the AMF detects that the terminal is unavailable and DDNfails, the AMF sends a response message (for example,Namf_CommunicationN1N2MessageTransfer) to the SMF, to notify the SMF ofthe DDN failure.

S808. The SMF further sends a DDN failure indication to the UPF.

S809. When the AMF determines that the UE is unavailable (for example,the UE is in a PSM status, or the UE is in an MICO status), the AMF setsor activates a corresponding event of terminal availability after DDNfailure based on the NEF reference ID.

S810. The terminal initiates a connection to a network. For example, theterminal initiates a TAU request or a service request to the network.

S811. If determining that the event of terminal availability after DDNfailure is locally set, the AMF sends a terminal event notification (forexample, Namf_EventExposure_Notify) to the NEF. The terminal eventnotification includes at least one of the following information theidentifier of the terminal and an NEF reference ID.

In this example, one or more AFs subscribe to a terminal event, and theterminal event is correlated to the AMF mainly in two manners (1) In onemanner, one event of availability after DDN failure is subscribed tofrom the AMF only for one UE, and the event may have different NEFreference IDs such that the AMF can report the event to different AFsusing NEFs. (2) In the other manner, each AF serving the UE maysubscribe to an event of availability after DDN failure from the AMF foreach event such that each event of availability after DDN failure maycorrespond to a different AF.

In an optional manner, alternatively, the AMF may directly report theevent to the AF.

S812. The NEF sends a terminal event notification (for example,Namf_EventExposure_Notify) to the AF based on the identifier of theterminal and/or the event correlation identifier.

After receiving the terminal event notification, the AF determines thatthe terminal is available, and may resend downlink data to the terminal.According to the communications method provided in this embodiment ofthis application, the terminal event is subscribed to from the sessionmanagement function entity that manages a specific service, whenreceiving the service detection notification from the UPF entity, thesession management function entity instructs the AMF entity to monitorthe terminal event. In this way, a terminal event may be subscribed toand monitored for a specific service in a 5G architecture.

EXAMPLE 4

In a roaming scenario, a roaming SMF (V-SMF) performs event monitoringand notification.

FIG. 7G to FIG. 71 are a schematic flowchart of still another example ofa communications method. Different from the example shown in FIG. 7C andFIG. 7D, a local session management function entity (H-SMF) forwards asubscription message on an event of terminal availability after DDNfailure to a V-SMF, and then the V-SMF performs event monitoring andnotification. Specifically, during or after session setup, a UDM/PCFperforms the following procedure.

S701′. The UDM/PCF determines a target H-SMF based on aDNN/S-NSSAI/AF-service-ID. The DNN/S-NSSAI/AF-service-ID is obtainedfrom a UDR or is locally stored.

S702 a′. The UDM/PCF sends a first message (for example,Nsmf_EventExposure) to the target H-SMF. The first message includesservice description information, event type information, and an eventcorrelation identifier (for example, an NEF reference ID), and mayfurther include information such as an NEF ID. In this example, theevent type is an event of terminal availability after DDN failure.

S702 b′. The H-SMF sends the first message to the V-SMF.

S703′. The V-SMF sends a service detection message to a roaming UPFentity (V-UPF) in a procedure for setting up or modifying an N4 session.The service detection message is used to instruct the V-UPF to detect aservice corresponding to a subscribed terminal event, that is, a servicecorresponding to the service description information. In addition, inanother implementation, the service detection message may be a serviceinformation request used to instruct the UPF entity to report serviceinformation. In this case, S705′ does not need to be performed. Theservice information may be at least one of a source IP address and asource port number of a downlink data packet, or may be indexinformation, where the index information is used to index a specificevent. The downlink data packet may be a discarded downlink data packet.Optionally, in case of a DDN failure, the session management functionentity sends the service information request to the UPF entity.

S704′. An AF sends a downlink data packet to a terminal.

S705′. Optionally, when the received service detection message is usedto instruct the UPF entity to detect a service, the V-UPF determines,according to a packet detection rule, that the downlink data packet isthe service corresponding to the subscribed terminal event. When a userplane tunnel needs to be established, the V-UPF sends a servicedetection notification to the V-SMF. The service detection notificationis used to indicate that occurrence of service data is detected. Inanother implementation, the service detection notification may beservice information, that is, the service information in S703′. Theservice information is determined based on the downlink data packet, andfurther, is determined based on a packet header of the received downlinkdata packet. For example, when the downlink data packet is an IP datapacket, a packet header of the downlink data packet includes IPquintuple information, when the downlink data packet is an Ethernet datapacket, a packet header of the downlink data packet includes a MACaddress.

S706′. The V-SMF sends a second message (for example,Namf_CommunicationN1N2MessageTransfer) to an AMF in response to theservice detection notification sent by the V-UPF. The second message isused to subscribe to the terminal event, and the second message includesevent type information. The event type is a terminal reachability event.Optionally, the second message may include event correlationinformation, for example, an event correlation identifier. The eventcorrelation information is used to determine event reportinginformation. Optionally, the session management function entity sendsthe event correlation information to the MME based on the servicedescription information and the service information. In other words, thesession management function entity compares the service information withthe service description information, and sends the event correlationinformation to the MME when the service information matches the servicedescription information.

S707′. If detecting that the terminal is unreachable, the AMF sends aresponse message (for example, Namf_CommunicationN1N2MessageTransfer) tothe V-SMF. The response message is used to indicate that the terminal isunreachable.

S708′. The V-SMF further sends a DDN failure indication to the V-UPF.

S709′. The AMF activates the terminal reachability event.

S710′. When the V-SMF determines that the terminal is unavailable (forexample, the terminal is in a PSM state, or the terminal is in an MICOstatus), the V-SMF sets an event of availability after DDN failure.

The terminal initiates a connection to a network. For example, theterminal initiates a TAU request or a service request to the network.

S711′. If determining that the V-SMF subscribes to a terminalreachability reporting event, the AMF sends a first terminal eventnotification (for example, Namf_EventExposure_Notify) to the V-SMF. Thefirst terminal event notification is used to notify that the terminal isreachable.

S712 a′. After determining that the event of availability after DDNfailure is set, the V-SMF sends a second terminal event notification toan NEF. The second terminal event notification includes at least one ofthe following information an identifier of the terminal and an eventcorrelation identifier of the terminal event.

S713′. The NEF sends the second terminal event notification to the AFbased on the identifier of the terminal and/or the event correlationidentifier.

As an alternative of S712 a′ and S713′, S712 b′ that the V-SMF may senda second terminal event notification to the AF may be alternativelyperformed. The second terminal event notification includes at least oneof the following information an AF identifier, an identifier of theterminal, and an event correlation identifier of the terminal event.

After receiving the terminal event notification, the AF determines thatthe terminal is available, and may resend downlink data to the terminal.

EXAMPLE 5

In a roaming scenario, a V-SMF detects a service, and an AMF receivessubscription of a terminal event from a UDM/PCF, and performs eventdetection and notification.

FIG. 7J to FIG. 7L are a schematic flowchart of still another example ofa communications method. A specific procedure is described as follows.

S801′. A UDM/PCF (SMF-PCF) determines a target H-SMF based on aDNN/S-NSSAI/AF-service-ID. The DNN/S-NSSAI/AF-service-ID is obtainedfrom a UDR or is locally stored. Further, a UDM/PCF (AMF-PCF) determinesan AMF based on an identifier of UE.

S802 a′. The UDM/PCF (AMF-PCF) sends a first message (for example,Nsmf_EventExposure) to the AMF in a registration process of the terminalor at any other time at which the terminal is in a registration state.The first message includes event type information and an eventcorrelation identifier (for example, an NEF reference ID), and mayfurther include an NEF ID. In this example, an event type is an event ofterminal availability after DDN failure.

S802 b′. During or after session setup, the UDM/PCF (SMF-PCF) sends asecond message (for example, Nsmf_EventExposure service message) to thetarget H-SMF. The second message includes service descriptioninformation and an event correlation identifier (for example, an NEFreference ID).

The AMF-PCF is a PCF correlated with the AMF, and is configured toprovide the AMF with a policy related to access and mobility and aterminal policy. The SMF-PCF is a PCF correlated with the H-SMF, and isconfigured to provide a session-related policy to the H-SMF. The AMF-PCFand the SMF-PCF may be a same function entity, or may be independentfunction entities.

S802 b″. The H-SMF sends a third message to the V-SMF. The third messageincludes service description information and an event correlationidentifier.

S803′. The V-SMF sends a service detection message to a V-UPF in aprocedure for setting up or modifying an N4 session. The servicedetection message is used to instruct the V-UPF to detect a servicecorresponding to a subscribed terminal event, that is, a servicecorresponding to the service description information. In addition, inanother implementation, the service detection message may be a serviceinformation request used to instruct the UPF entity to report serviceinformation. In this case, S805′ does not need to be performed. Theservice information may be at least one of a source IP address and asource port number of a downlink data packet, or may be indexinformation, where the index information is used to index a specificevent. The downlink data packet may be a discarded downlink data packet.Optionally, in case of a DDN failure, the session management functionentity sends the service information request to the UPF entity.

S804′. An AF sends a downlink data packet to the terminal.

S805′. Optionally, when the received service detection message is usedto instruct the UPF entity to detect a service, the V-UPF receives thedownlink data packet, and determines, according to a packet detectionrule, that the downlink data packet is the service corresponding to thesubscribed terminal event. When a user plane tunnel needs to beestablished, the V-UPF sends a DDN to the V-SMF. The DDN is used toindicate occurrence of service data.

S806′. The V-SMF sends a fourth message (for example,Namf_CommunicationN1N2MessageTransfer) to the AMF in response to aservice detection notification sent by the V-UPF. The fourth messageincludes an NEF reference ID, and may further include an NEF ID. Itshould be noted that, in this embodiment, the V-SMF activates, using thefourth message, the AMF to monitor the terminal event. In this case, theV-SMF instructs the AMF to start to monitor the terminal event, and theUDM/PCF has configured, using the first message, the AMF to monitor theterminal event. That is, configuring terminal event monitoring anddetecting the service corresponding to the service descriptioninformation may be independent processes, and may be indicated indifferent messages.

In the foregoing procedure, an event subscription message and an eventmonitoring notification are sent by different function entities or bythe V-SMF. The AMF first receives subscription information of the eventof availability after DDN failure, and then the AMF receives an eventmonitoring notification, where the event monitoring notificationincludes the NEF reference ID. In this case, the AMF may correlate themonitoring notification with the event. In another implementation, theservice detection notification may be service information, that is, theservice information in S803′. The service information is determinedbased on the downlink data packet, and further, is determined based on apacket header of the received downlink data packet. For example, whenthe downlink data packet is an IP data packet, a packet header of thedownlink data packet includes IP quintuple information, when thedownlink data packet is an Ethernet data packet, a packet header of thedownlink data packet includes a MAC address.

Optionally, the fourth message may include event correlationinformation, for example, an event correlation identifier (an NEFreference ID). The event correlation information is used to determineevent reporting information. Optionally, the session management functionentity sends the event correlation information to the MME based on theservice description information and the service information. In otherwords, the session management function entity compares the serviceinformation with the service description information, and sends theevent correlation information to the MME when the service informationmatches the service description information.

S807′. When the AMF detects that the terminal is unavailable and DDNfails, the AMF sends a response message (for example,Namf_CommunicationN1N2MessageTransfer) to the V-SMF, to notify the V-SMFof the DDN failure.

S808′. The V-SMF further sends a DDN failure indication to the V-UPF.

S809′. When the AMF determines that the UE is unavailable (for example,the UE is in a PSM status, or the UE is in an MICO status), the AMF setsor activates a corresponding event of terminal availability after DDNfailure based on the NEF reference ID.

S810′. The terminal initiates a connection to a network. For example,the terminal initiates a TAU request or a service request to thenetwork.

S811′. If determining that the event of terminal availability after DDNfailure is locally set, the AMF sends a terminal event notification (forexample, Namf_EventExposure Notify) to the NEF. The terminal eventnotification includes at least one of the following information theidentifier of the terminal and an NEF reference ID.

In this example, one or more AFs subscribe to a terminal event, and theterminal event is correlated to the AMF mainly in two manners (1) In onemanner, one event of availability after DDN failure is subscribed tofrom the AMF only for one UE, and the event may have different NEFreference IDs such that the AMF can report the event to different AFsusing NEFs. (2) In the other manner, each AF serving the UE maysubscribe to an event of availability after DDN failure from the AMF foreach event such that each event of availability after DDN failure maycorrespond to a different AF.

In an optional manner, alternatively, the AMF may directly report theevent to the AF.

S812′. The NEF sends a terminal event notification (for example,Namf_EventExposure Notify) to the AF based on the identifier of theterminal and/or the event correlation identifier.

After receiving the terminal event notification, the AF determines thatthe terminal is available, and may resend downlink data to the terminal.According to the communications method provided in this embodiment ofthis application, the terminal event is subscribed to from the sessionmanagement function entity that manages a specific service, whenreceiving the service detection notification from the UPF entity, thesession management function entity instructs the AMF entity to monitorthe terminal event. In this way, a terminal event may be subscribed toand monitored for a specific service in a 5G architecture.

The foregoing describes in detail the methods in the embodiments of thisapplication. The following provides apparatuses in the embodiments ofthis application.

FIG. 8 is a schematic block diagram of a communications apparatusaccording to an embodiment of this application. The communicationsapparatus may be the control function entity described in the foregoingcommunications system, and may be further a UDM, a PCF, an NEF, or thelike. Specifically, the communications apparatus 1000 may include areceiving unit 11 and a sending unit 12.

The processing unit 11 is configured to determine a session managementfunction entity based on at least one of a DNN, slice information, andan application function service identifier.

The sending unit 12 is configured to send a first message to the sessionmanagement function entity, where the first message is used to subscribeto a terminal event, the first message includes service descriptioninformation, and the service description information is used to indicatea service corresponding to the terminal event.

In an implementation, the service description information is furtherused to determine an application function entity that provides a servicefor the terminal.

In another implementation, the first message further includes an eventcorrelation identifier and event type information of the terminal event,the event correlation identifier is used to identify a correlationrelationship between the terminal event and a function entity thatsubscribes to the terminal event, and the event type information is usedto identify the terminal event.

In still another implementation, the sending unit is further configuredto send a second message to an AMF entity, where the second message isused to subscribe to the terminal event, and the second message includesan event correlation identifier and event type information of theterminal event, the event correlation identifier is used to identify acorrelation relationship between the terminal event and a functionentity that subscribes to the terminal event, and the event typeinformation is used to identify the terminal event.

In still another implementation, the communications apparatus 1000 mayfurther include a receiving unit 13.

The receiving unit 13 is configured to receive a third message from theapplication function entity, where the third message is used tosubscribe to the terminal event, and the third message includes theservice description information.

In still another implementation, the third message further includes atleast one of the following information an identifier of the terminalcorresponding to the terminal event, the event type information of theterminal event, the DNN, the slice information, and the applicationfunction service identifier.

In still another implementation, the receiving unit 13 is furtherconfigured to receive the third message forwarded by the networkexposure function entity.

In still another implementation, the sending unit 12 is furtherconfigured to send at least one of the service description information,the event correlation identifier, the identifier of the terminal, theevent type of the terminal event, the DNN, the slice information, andthe application function service identifier to a unified data repositoryfunction entity for storage.

In still another implementation, the processing unit 11 is furtherconfigured to obtain at least one of the service descriptioninformation, the event correlation identifier, the identifier of theterminal, the event type information of the terminal event, the DNN, theslice information, and the application function service identifierlocally or from the unified data repository function entity.

In still another implementation, the receiving unit 13 is furtherconfigured to receive the terminal event notification from the AMFentity or the session management function entity. The sending unit 11 isfurther configured to send the terminal event notification to theapplication function entity.

In still another implementation, the event type of the terminal eventincludes an event of terminal availability after DDN failure.

FIG. 9A is a schematic block diagram of another communications apparatusaccording to an embodiment of this application. The communicationsapparatus may be the AMF entity described in the foregoingcommunications system. Specifically, the communications apparatus 2000 amay include a receiving unit 21 a, a monitoring unit 22 a, and a sendingunit 23 a.

The receiving unit 21 a is configured to receive a first message sent bya session management function entity, where the first message is used tosubscribe to a terminal event.

The monitoring unit 22 a is configured to monitor the subscribedterminal event.

The sending unit 23 a is configured to, when the monitoring unit detectsthe terminal event, send the terminal event notification to a functionentity that subscribes to the terminal event, where the terminal eventnotification includes at least one of the following information anidentifier of a terminal corresponding to the terminal event and anevent correlation identifier of the terminal event, where the eventcorrelation identifier is used to identify a correlation relationshipbetween the terminal event and a function entity that subscribes to theterminal event.

FIG. 9B is a schematic block diagram of still another communicationsapparatus according to an embodiment of this application. Thecommunications apparatus may be the AMF entity described in theforegoing communications system. Specifically, the communicationsapparatus 2000 b may include a receiving unit 21 b, a monitoring unit 22b, and a sending unit 23 b.

The receiving unit 21 b is configured to receive a notification that isfor monitoring a terminal reachability event and that is sent by asession management function entity.

The monitoring unit 22 b is configured to monitor terminal reachabilityevent.

The sending unit 23 b is configured to send a terminal reachabilitynotification to the session management function entity when themonitoring unit detects the terminal reachability event, where theterminal reachability notification is used to monitor an event ofterminal availability after DDN failure.

FIG. 10 is a schematic block diagram of still another communicationsapparatus according to an embodiment of this application. Thecommunications apparatus may be the session management function entitydescribed in the foregoing communications system. Specifically, thecommunications apparatus 3000 may include a sending unit 31 and areceiving unit 32.

The sending unit 31 is configured to instruct a UPF entity to detect aservice, where the service is a service corresponding to a subscribedterminal event, or is configured to send a service information requestto a UPF entity. The receiving unit 32 is configured to receive aservice detection notification or service information sent by the UPFentity, where the service detection notification is used to indicateoccurrence of the service data. The sending unit 31 is furtherconfigured to send, in response to the service detection notification, anotification that is for monitoring the terminal event to an AMF entity.

In an implementation, the receiving unit 32 is further configured toreceive a first message sent by a control function entity, where thefirst message is used to indicate the service, and the first messageincludes service description information of the service.

In another implementation, the first message is further used tosubscribe to the terminal event, the first message includes an eventcorrelation identifier and event type information of the terminal event,the event correlation identifier is used to identify a correlationrelationship between the terminal event and a function entity thatsubscribes to the terminal event, and the event type information is usedto identify the terminal event.

In still another implementation, the sending unit 31 is configured toinstruct the UPF entity to detect a service when the UPF entity does notstore access network tunnel information for transmitting the servicedata.

In still another implementation, the terminal event includes an event ofterminal availability after DDN failure. The receiving unit 32 isfurther configured to receive a terminal reachability notification or anotification on an event of terminal availability after DDN failure thatis sent by the AMF entity, and send the notification on terminalavailability after DDN failure to a network exposure function entity oran application function entity.

FIG. 11 is a schematic block diagram of still another communicationsapparatus according to an embodiment of this application. Thecommunications apparatus may be the UPF entity described in theforegoing communications system. Specifically, the communicationsapparatus 4000 may include a receiving unit 41, a detection unit 42, anda sending unit 43.

The receiving unit 41 is configured to receive a first message or aservice information request sent by a session management functionentity, where the first message is used to instruct to detect a service,and the service is a service corresponding to a subscribed terminalevent. The detection unit 42 is configured to detect the service basedon the first message. The sending unit 43 is configured to send aservice detection notification or service information to the sessionmanagement function entity, where the service detection notification isused to indicate occurrence of the service data.

In an implementation, the detection unit 42 is configured to detect theservice based on the first message when access network tunnelinformation for transmitting the service data is not stored.

FIG. 12 is a schematic structural diagram of hardware of acommunications apparatus according to an embodiment of this application.The communications apparatus includes a processor, and may furtherinclude a receiver, a transmitter, and a memory. The receiver, thetransmitter, the memory, and the processor are connected to each otherusing a bus.

The memory includes but is not limited to a random-access memory (RAM),a read-only memory (ROM), an erasable programmable read-only memory(EPROM), or a compact disc ROM (CD-ROM). The memory is configured tostore a related instruction and related data.

The receiver is configured to receive data and/or a signal, and thetransmitter is configured to send data and/or a signal. The transmitterand the receiver may be independent components, or may be an integralcomponent.

The processor may include one or more processors, for example, includesone or more central processing units (CPU). When the processor is oneCPU, the CPU may be a single-core CPU, or may be a multi-core CPU.

The memory is configured to store program code and data of thecommunications apparatus.

The processor is configured to invoke the program code and the data inthe memory, to perform the steps in the foregoing method embodiments.For details, refer to the descriptions in the method embodiments, anddetails are not described herein again.

It may be understood that FIG. 12 shows only a simplified design of thecommunications apparatus. In an embodiment, the communications apparatusmay further include other necessary components, including but notlimited to any quantity of transceivers, processors, controllers,memories, and the like, and all communications apparatuses that canimplement the embodiments of the present disclosure shall all fallwithin the protection scope of the present disclosure.

In an embodiment, the communications apparatus may be the controlfunction entity in the foregoing communications system. In FIG. 8 , arelated function implemented by the receiving unit 13 may be implementedby a receiver, a related function implemented by the sending unit 12 maybe implemented by a transmitter, and a related function implemented bythe processing unit 11 may be implemented by one or more processors.

Specifically, the processor is configured to determine a sessionmanagement function entity based on at least one of a DNN, sliceinformation, and an application function service identifier.

The transmitter is configured to send a first message to the sessionmanagement function entity, where the first message is used to subscribeto a terminal event, the first message includes service descriptioninformation, and the service description information is used to indicatea service corresponding to the terminal event.

In an implementation, the service description information is furtherused to determine an application function entity that provides a servicefor the terminal.

In another implementation, the first message further includes an eventcorrelation identifier and event type information of the terminal event,the event correlation identifier is used to identify a correlationrelationship between the terminal event and a function entity thatsubscribes to the terminal event, and the event type information is usedto identify the terminal event.

In still another implementation, the transmitter is further configuredto send a second message to an AMF entity, where the second message isused to subscribe to the terminal event, and the second message includesan event correlation identifier and event type information of theterminal event, the event correlation identifier is used to identify acorrelation relationship between the terminal event and a functionentity that subscribes to the terminal event, and the event typeinformation is used to identify the terminal event.

In still another implementation, the receiver is configured to receive athird message from the application function entity, where the thirdmessage is used to subscribe to the terminal event, and the thirdmessage includes the service description information.

In still another implementation, the third message further includes atleast one of the following information an identifier of the terminalcorresponding to the terminal event, the event type information of theterminal event, the DNN, the slice information, and the applicationfunction service identifier.

In still another implementation, the receiver is further configured toreceive the third message forwarded by a network exposure functionentity.

In still another implementation, the transmitter is further configuredto send at least one of the service description information, the eventcorrelation identifier, the identifier of the terminal, the event typeof the terminal event, the DNN, the slice information, and theapplication function service identifier to a unified data repositoryfunction entity for storage.

In still another implementation, the processor is further configured toobtain at least one of the service description information, the eventcorrelation identifier, the identifier of the terminal, the event typeinformation of the terminal event, the DNN, the slice information, andthe application function service identifier locally or from the unifieddata repository function entity.

In still another implementation, the receiver is further configured toreceive the terminal event notification from the AMF entity or thesession management function entity. The transmitter is furtherconfigured to send the terminal event notification to the applicationfunction entity.

In still another implementation, the event type of the terminal eventincludes an event of terminal availability after DDN failure.

In another embodiment, the communications apparatus may be the AMFentity in the foregoing communications system. In FIG. 9A, a relatedfunction implemented by the monitoring unit 22 a may be implemented byone or more processors, a related function implemented by the sendingunit 23 a may be implemented by a transmitter, and a related functionimplemented by the receiving unit 21 a may be implemented by a receiver.

Specifically, the receiver is configured to receive a first message sentby a session management function entity, where the first message is usedto subscribe to a terminal event.

The processor is configured to monitor the subscribed terminal event.

The transmitter is configured to, when the processor detects theterminal event, send the terminal event notification to a functionentity that subscribes to the terminal event, where the terminal eventnotification includes at least one of the following information anidentifier of a terminal corresponding to the terminal event and anevent correlation identifier of the terminal event, where the eventcorrelation identifier is used to identify a correlation relationshipbetween the terminal event and a function entity that subscribes to theterminal event.

In still another embodiment, the communications apparatus may be the AMFentity in the foregoing communications system. In FIG. 9B, a relatedfunction implemented by the receiving unit 21 b may be implemented by areceiver, a related function implemented by the monitoring unit 22 b maybe implemented by one or more processors, and a related functionimplemented by the sending unit 23 b may be implemented by atransmitter.

Specifically, the receiver is configured to receive a notification thatis for monitoring a terminal reachability event and that is sent by asession management function entity.

The processor is configured to monitor a terminal reachability event.

The transmitter is configured to send a terminal reachabilitynotification to the session management function entity when themonitoring unit detects the terminal reachability event, where theterminal reachability notification is used to monitor an event ofterminal availability after DDN failure.

In still another embodiment, the communications apparatus may be thesession management function entity in the foregoing communicationssystem. In FIG. 10 , a related function implemented by the sending unit31 may be implemented by the transmitter, and a related functionimplemented by the receiving unit 32 may be implemented by the receiver.

Specifically, the transmitter is configured to instruct a UPF entity todetect a service, where the service is a service corresponding to asubscribed terminal event.

The receiver is configured to receive a service detection notificationsent by the UPF entity, where the service detection notification is usedto indicate occurrence of the service data.

The transmitter is further configured to send, in response to theservice detection notification, a notification that is for monitoringthe terminal event to an AMF entity.

In an implementation, the receiver is further configured to receive afirst message sent by a control function entity, where the first messageis used to indicate the service, and the first message includes servicedescription information of the service.

In another implementation, the first message is further used tosubscribe to the terminal event, the first message includes an eventcorrelation identifier and event type information of the terminal event,the event correlation identifier is used to identify a correlationrelationship between the terminal event and a function entity thatsubscribes to the terminal event, and the event type information is usedto identify the terminal event.

In still another implementation, the transmitter is configured toinstruct the UPF entity to detect a service when the UPF entity does notstore access network tunnel information for transmitting the servicedata.

In still another implementation, the terminal event includes an event ofterminal availability after DDN failure. The receiver is furtherconfigured to receive a terminal reachability notification or anotification on an event of terminal availability after DDN failure thatis sent by the AMF entity, and send the notification on terminalavailability after DDN failure to a network exposure function entity oran application function entity.

In still another embodiment, the communications apparatus may be the UPFentity in the foregoing communications system. In FIG. 11 , a relatedfunction implemented by the receiving unit 41 may be implemented by areceiver, a related function implemented by the detection unit 42 may beimplemented by one or more processors, and a related functionimplemented by the sending unit 43 may be implemented by a transmitter.

Specifically, the receiver is configured to receive a first message sentby a session management function entity, where the first message is usedto instruct to detect a service, and the service is a servicecorresponding to a subscribed terminal event.

The processor is configured to detect the service based on the firstmessage.

The transmitter is configured to send a service detection notificationto the session management function entity, where the service detectionnotification is used to indicate occurrence of the service data.

In an implementation, the processor is configured to detect the servicebased on the first message when access network tunnel information fortransmitting the service data is not stored.

In still another embodiment, the communications apparatus may be thesession management function entity in the foregoing communicationssystem. In FIG. 15 , a related function implemented by a receiving unit52 may be implemented by a receiver, a related function implemented byan instruction unit 51 and a monitoring unit 53 may be implemented byone or more processors, and a related function implemented by a sendingunit 54 may be implemented by a transmitter.

Specifically, the processor is configured to instruct a UPF entity todetect a service, where the service is a service corresponding to aterminal event subscribed to by a first application function entity.

The receiver is configured to receive a service detection notificationsent by the UPF entity, where the service detection notification is usedto indicate that data of the service is detected.

The processor is further configured to monitor the terminal event basedon the service detection notification when the terminal is unreachable.

The transmitter is configured to, when the terminal event is detected,send a terminal event notification to a network exposure function entityor the first application function entity.

FIG. 13 is a schematic flowchart of still another communications methodaccording to an embodiment of this application. The method may includethe following steps.

S901. A control function entity determines a session management functionentity based on at least one of a DNN, slice information, and anapplication function service identifier.

Specifically, that a control function entity determines a sessionmanagement function entity based on at least one of a DNN, sliceinformation, and an application function service identifier may be thecontrol function entity determines the session management functionentity based on the DNN, based on the slice information, based on theapplication function service identifier, based on the DNN and the sliceinformation, based on the DNN and the application function serviceidentifier, based on the slice information and the application functionservice identifier, or based on the DNN, the slice information, and theapplication function service identifier.

S902. The control function entity sends a first message to the sessionmanagement function entity. The first message is used to subscribe to aterminal event, the first message includes service descriptioninformation, and the service description information is used to indicatea service corresponding to the terminal event.

The terminal event includes an event of terminal availability after DDNfailure or a terminal reachability event.

The subscribing to a terminal event means that, when service data issent, UE is unreachable, or when service data fails to be sent, a UEreachability event or a data availability event is monitored such thatan AF resends the service data.

S903. The session management function entity sends a second message to aUPF entity. The second message is used to instruct the UPF entity todetect a service. The service is the service corresponding to thesubscribed terminal event. In addition, in another implementation, thesecond message may be a service information request, and is used toinstruct the UPF entity to report service information. In this case,S904 does not need to be performed. The service information may be atleast one of a source IP address and a source port number of a downlinkdata packet, or may be index information, where the index information isused to index a specific event. The downlink data packet may be adiscarded downlink data packet. Optionally, in case of a DDN failure,the session management function entity sends the service informationrequest to the UPF entity.

Optionally, the SMF instructs, by sending a second message, the UPF todetect a service.

S904. Optionally, when the received second message is used to instructthe UPF entity to detect a service, the UPF entity detects the service.

S905. The UPF entity sends a service detection notification to thesession management function entity. The service detection notificationis used to indicate occurrence of service data. The session managementfunction entity receives the service detection notification. In anotherimplementation, the service detection notification may be serviceinformation, that is, the service information in S903. The serviceinformation is determined based on the downlink data packet, andfurther, is determined based on a packet header of the received downlinkdata packet. For example, when the downlink data packet is an IP datapacket, a packet header of the downlink data packet includes IPquintuple information, when the downlink data packet is an Ethernet datapacket, a packet header of the downlink data packet includes a MACaddress.

S906. When the terminal is unreachable, the session management functionentity monitors the terminal event based on the service detectionnotification.

Specifically, when the notification on a downlink data sending failuresent by the AMF entity is received or service data of a secondapplication function entity is detected, it is determined that theterminal is unreachable if an unreachability notification sent by theAMF entity is received.

That the SMF monitors the terminal event based on the service detectionnotification means that the SMF monitors the terminal event after theSMF receives the service detection notification and when the UE isunreachable.

S907. When detecting the terminal event, the session management functionentity sends a terminal event notification to the application functionentity.

An optional manner of monitoring the terminal event is receiving aterminal reachability event notification or a notification on an eventof terminal availability after downlink data sending failure that issent by the AMF entity, and monitoring the terminal event when theterminal reachability event notification or the notification on theevent of terminal availability after downlink data sending failure thatis sent by the AMF entity is received.

Specifically, the terminal event notification is sent to the NEF or afirst application function entity.

According to the communications method provided in this embodiment ofthis application, the session management function entity instructs theUPF entity to detect a specific service, when the terminal isunreachable, monitors the terminal event based on the service detectionnotification sent by the UPF entity, and sends the terminal eventnotification when detecting the terminal event. In this way, a terminalevent may be subscribed to and notified of for a specific service in a5G architecture.

The following describes in detail the embodiment shown in FIG. 13 withreference to specific examples.

FIGS. 14A and FIG. 14B are a schematic flowchart of still anothercommunications method according to an embodiment of this application.The method may include the following steps.

S1001. A UDM/PCF determines a target SMF based on aDNN/S-NSSAI/AF-service-ID. The DNN/S-NSSAI/AF-service-ID may be obtainedfrom a UDR or may be locally stored.

S1002. The UDM/PCF sends a first message (for example,Nsmf_EventExposure) to the target SMF. The first message includesservice description information, event type information, and an eventcorrelation identifier (for example, an NEF reference ID), and mayfurther include information such as an NEF ID. In this example, an eventtype is an event of terminal availability after DDN failure.

The SMF receives the first message.

Specifically, after the SMF receives the event of availability after DDNfailure and the service description information, the SMF correlates theevent of availability after DDN failure with the service descriptioninformation. If the two are sent together (sent in a same message), itindicates that the two are correlated with each other. Alternatively, ifthe service description information is sent in a subscription message onthe event of availability after DDN failure, it indicates that the twoare correlated with each other.

S1003. The SMF sends a service detection message to a UPF in a procedurefor setting up or modifying an N4 session. The service detection messageincludes the service description information.

Specifically, when receiving, from the UPF, a notification that datacorresponding to the service description information is detected, theSMF may determine an event to which the data corresponds triggers theevent, and therefore send the event correlation identifier to acorresponding AMF. In addition, in another implementation, the servicedetection message may be a service information request used to instructthe UPF entity to report service information. In this case, S1006 doesnot need to be performed. The service information may be at least one ofa source IP address and a source port number of a downlink data packet,or may be index information, where the index information is used toindex a specific event. The downlink data packet may be a discardeddownlink data packet. Optionally, in case of a DDN failure, the sessionmanagement function entity sends the service information request to theUPF entity.

The UPF detects a corresponding service based on the service detectionmessage, that is, detects a service corresponding to the servicedescription information.

S1004. The AMF sends UE unreachability information to the SMF.

The AMF may send the UE unreachability information to the SMF whenreceiving service data sent by another AF and detecting that UE isunreachable. Alternatively, the AMF sends the UE unreachabilityinformation to the SMF in case of a DDN failure.

Optionally, S1004 may be any step before S1007.

S1005. An AF sends a downlink data packet to the terminal.

S1006. Optionally, when the received service detection message is usedto instruct the UPF entity to detect a service, the UPF detects,according to a packet detection rule, that the downlink data packet is aservice corresponding to the subscribed terminal event.

When the UPF does not store access tunnel information of the session, auser plane tunnel needs to be established, and the UPF sends a servicedetection notification to the SMF. The service detection notification isused to indicate that occurrence of the service data is detected.

Specifically, the service corresponding to the subscribed terminal eventis the service corresponding to the service description information. Thepacket detection rule includes the service description information. Forexample, the service description information is an IP triplet, and theUPF detects the received downlink data packet based on the IP triplet.When the downlink data packet corresponding to the IP triplet isdetected, it is determined that occurrence of the service data isdetected.

S1007. The SMF activates an event when the UE is unreachable.

In this embodiment, the SMF monitors a terminal reachability event.

For a subsequent procedure, refer to the embodiment shown in FIG. 7A andFIG. 7B. Details are not described herein again.

S1008. The terminal initiates a connection to a network. For example,the terminal initiates a TAU request or a service request to thenetwork.

S1009. The AMF sends a UE reachability event notification to the SMF.

In another implementation, the service detection notification may beservice information, that is, the service information in S1003. Theservice information is determined based on the downlink data packet, andfurther, is determined based on a packet header of the received downlinkdata packet. For example, when the downlink data packet is an IP datapacket, a packet header of the downlink data packet includes IPquintuple information, when the downlink data packet is an Ethernet datapacket, a packet header of the downlink data packet includes a MACaddress.

S1010. The SMF sends a terminal event notification to an NEF ifdetermining that the UE reachability event is locally set. The terminalevent notification includes at least one of the following information anidentifier of the terminal and an event correlation identifier (forexample, an NEF reference ID).

S1011. The NEF sends a terminal availability event notification (forexample, Namf_EventExposure_Notify) to the AF based on the identifier ofthe terminal and/or the NEF reference ID.

After receiving the terminal event notification, the AF determines thatthe terminal is available, and may resend downlink data to the terminal.

FIG. 14 b -1 and FIG. 14 b -2 are a schematic flowchart of still anothercommunications method according to an embodiment of this application.The method may include the following steps.

S1101. A UDM/PCF determines a target SMF based on aDNN/S-NSSAI/AF-service-ID. The DNN/S-NSSAI/AF-service-ID may be obtainedfrom a UDR or may be locally stored.

S1102. The UDM/PCF sends a first message to the target SMF.

S1103. The SMF sends a service detection message to a UPF in a procedurefor setting up or modifying an N4 session.

S1104. An AF sends a downlink data packet to a terminal.

S1105. The UPF sends a service detection notification to the SMF.

S1106. The SMF sends a second message to the AMF.

Different from the embodiment shown in FIG. 14A and FIG. 14B, the secondmessage herein is an ordinary DDN message instead of an eventsubscription message. For implementation of other steps, refer todescriptions of corresponding steps in FIG. 14A and FIG. 14B. Detailsare not described herein again. In addition, in another implementation,the second message may be a service information request, and is used toinstruct the UPF entity to report service information. The serviceinformation may be at least one of a source IP address and a source portnumber of a downlink data packet, or may be index information, where theindex information is used to index a specific event. The downlink datapacket may be a discarded downlink data packet. Optionally, in case of aDDN failure, the session management function entity sends the serviceinformation request to the UPF entity.

S1107. The AMF sends a response message to the SMF, to notify the SMFthat the UE is unreachable.

Correspondingly, after receiving the second message, if detecting thatthe UE is unreachable, the AMF notifies the SMF that the UE isunreachable.

S1108. The SMF activates an event when the UE is unreachable.

S1109. The SMF sends a DDN failure message to the UPF.

S1110. The AMF stores a first indication, where the first indication isused to indicate that the SMF has been notified that the UE isunreachable.

The AMF stores the first indication, to notify the SMF when the UE isreachable.

For a subsequent procedure, refer to the embodiment shown in FIG. 7A andFIG. 7B. Details are not described herein again.

S1111. The terminal initiates a connection to a network.

S1112. The AMF sends a UE reachability event notification to the SMF.

S1113. The SMF sends a terminal event notification to an NEF ifdetermining that a UE reachability event is locally set.

S1114. The NEF sends a terminal availability event notification to theAF based on an identifier of the terminal and/or an NEF reference ID.

After receiving the terminal event notification, the AF determines thatthe terminal is available, and may resend downlink data to the terminal.

FIG. 14 c -1 to FIG. 14 c -3 are a schematic flowchart of still anothercommunications method according to an embodiment of this application.The method is applied to a roaming scenario. The method may include thefollowing steps.

S1201. A UDM/PCF determines to subscribe to a terminal event from anSMF.

Specifically, the UDM/PCF determines a target H-SMF based on aDNN/S-NSSAI/AF-service-ID. The DNN/S-NSSAI/AF-service-ID may be obtainedfrom a UDR or may be locally stored.

S1202 a. The UDM/PCF sends a first message (for example,Nsmf_EventExposure) to the target H-SMF. The first message includesservice description information, event type information, and an eventcorrelation identifier (for example, an NEF reference ID), and mayfurther include information such as an NEF ID. In this example, an eventtype is an event of terminal availability after DDN failure.

The H-SMF receives the first message.

S1202 b. The H-SMF forwards the first message to a V-SMF.

After the V-SMF receives the event of availability after DDN failure andthe service description information, the V-SMF correlates the event ofavailability after DDN failure with the service description information.If the two are sent together (sent in a same message), it indicates thatthe two are correlated with each other. Alternatively, if the servicedescription information is sent in a subscription message on the eventof availability after DDN failure, it indicates that the two arecorrelated with each other.

S1203. The V-SMF sends a service detection message to a V-UPF in aprocedure for setting up or modifying an N4 session. The servicedetection message includes the service description information.

Specifically, when receiving, from the V-UPF, a notification that datacorresponding to the service description information is detected, theV-SMF may determine an event to which the data corresponds triggers theevent, and therefore send the event correlation identifier to acorresponding AMF.

The V-UPF detects a corresponding service based on the service detectionmessage, that is, detects a service corresponding to the servicedescription information.

In addition, in another implementation, a second message may be aservice information request, and is used to instruct the UPF entity toreport service information. In this case, S1205 does not need to beperformed. The service information may be at least one of a source IPaddress and a source port number of a downlink data packet, or may beindex information, where the index information is used to index aspecific event. The downlink data packet may be a discarded downlinkdata packet. Optionally, in case of a DDN failure, the sessionmanagement function entity sends the service information request to theUPF entity.

For a subsequent procedure such as detecting, by the AMF, whether UE isreachable, refer to the embodiment shown in FIG. 7A and FIG. 7B. Detailsare not described herein again.

S1204. An AF sends a downlink data packet to a terminal.

S1205. Optionally, when the received second message is used to instructthe UPF entity to detect a service, the V-UPF detects, according to apacket detection rule, that the downlink data packet is a servicecorresponding to the subscribed terminal event.

When the V-UPF does not store access tunnel information of the session,a user plane tunnel needs to be established, and the V-UPF sends aservice detection notification to the V-SMF. The service detectionnotification is used to indicate that occurrence of service data isdetected.

S1206. When the UE is unreachable, the V-SMF activates an event ofavailability after DDN failure.

In this embodiment, the V-SMF monitors the terminal event.

For a subsequent procedure such as detecting, by the AMF, that the UE isreachable and notifying the V-SMF, refer to the embodiment shown in FIG.7A and FIG. 7B. Details are not described herein again.

The terminal initiates a connection to a network.

S1207. The AMF sends a first terminal event notification to the V-SMF.The first terminal event notification is a UE reachability eventnotification.

S208 a. The V-SMF sends a terminal event notification to an NEF ifdetermining that a UE reachability event is locally set.

S1209. The NEF sends a terminal availability event notification (forexample, Namf_EventExposure_Notify) to the AF based on an identifier ofthe terminal and/or the NEF reference ID.

As an alternative step of S1208 a and S1209, in S1208 b, the V-SMF sendsa terminal availability event notification to the AF.

After receiving the terminal event notification, the AF determines thatthe terminal is available, and may resend downlink data to the terminal.

FIG. 14 d -1 and FIG. 14 d -2 are a schematic flowchart of still anothercommunications method according to an embodiment of this application.The method is applied to a roaming scenario. The method may include thefollowing steps.

S1301. A UDM/PCF determines to subscribe to a terminal event from anSMF.

Specifically, the UDM/PCF determines a target H-SMF based on aDNN/S-NSSAI/AF-service-ID. The DNN/S-NSSAI/AF-service-ID may be obtainedfrom a UDR or may be locally stored.

S1302. The UDM/PCF sends a first message (for example,Nsmf_EventExposure) to the target H-SMF. The first message includesservice description information, event type information, and an eventcorrelation identifier (for example, an NEF reference ID), and mayfurther include information such as an NEF ID. In this example, an eventtype is an event of terminal availability after DDN failure.

The H-SMF receives the first message.

After the H-SMF receives the event of availability after DDN failure andthe service description information, the H-SMF correlates the event ofavailability after DDN failure with the service description information.If the two are sent together (sent in a same message), it indicates thatthe two are correlated with each other. Alternatively, if the servicedescription information is sent in a subscription message on the eventof availability after DDN failure, it indicates that the two arecorrelated with each other.

S1303. The H-SMF sends a service detection message to an H-UPF in aprocedure for setting up or modifying an N4 session. The servicedetection message includes the service description information.

Specifically, when receiving, from the H-UPF, a notification that datacorresponding to the service description information is detected, theH-SMF may determine an event to which the data corresponds triggers theevent, and therefore send the event correlation identifier to acorresponding AMF.

The H-UPF detects a corresponding service based on the service detectionmessage, that is, detects a service corresponding to the servicedescription information.

In addition, in another implementation, a second message may be aservice information request, and is used to instruct the UPF entity toreport service information. In this case, S1306 does not need to beperformed. The service information may be at least one of a source IPaddress and a source port number of a downlink data packet, or may beindex information, where the index information is used to index aspecific event. The downlink data packet may be a discarded downlinkdata packet. Optionally, in case of a DDN failure, the sessionmanagement function entity sends the service information request to theUPF entity.

S1304. The H-SMF receives UE unreachability information.

The AMF may send the UE reachability information to the H-SMF whenreceiving service data sent by another AF and detecting that the UE isunreachable.

Optionally, S1304 may be any step before S1307.

S1305. An AF sends a downlink data packet to the terminal.

S1306. Optionally, when the received service detection message is usedto instruct the UPF entity to detect a service, the H-UPF detects,according to the packet detection rule, that the downlink data packet isa service corresponding to the subscribed terminal event.

When the H-UPF does not store access tunnel information of the session,a user plane tunnel needs to be established, and the H-UPF sends aservice detection notification to the H-SMF. The service detectionnotification is used to indicate that occurrence of service data isdetected.

S1307. When the UE is unreachable, the H-SMF activates an event ofavailability after DDN failure.

In this embodiment, the H-SMF monitors the terminal event.

For a subsequent procedure such as detecting, by the AMF, that the UE isreachable and notifying the H-SMF, refer to the embodiment shown in FIG.7A and FIG. 7B. Details are not described herein again.

The terminal initiates a connection to a network.

S1308. The AMF sends a terminal event notification to a V-SMF. Theterminal event notification is a UE reachability event notification.

S1309 a. The V-SMF forwards the terminal event notification to theH-SMF.

S1309 b. The H-SMF sends a terminal event notification to an NEF ifdetermining that a UE reachability event is locally set.

S1310. The NEF sends a terminal availability event notification (forexample, Namf_EventExposure_Notify) to the AF based on an identifier ofthe terminal and/or the NEF reference ID.

After receiving the terminal event notification, the AF determines thatthe terminal is available, and may resend downlink data to the terminal.

FIG. 14 e is a schematic flowchart of still another communicationsmethod according to an embodiment of this application. The method mayinclude the following steps.

S1400. A V-SMF receives event information or instruction informationfrom an H-SMF. The instruction information is used to instruct the V-SMFto send an N4 session release request to a V-UPF when the V-SMF receivessession deactivation information sent by an AMF.

S1401 a. UE and a (R)AN perform a connection release procedure.

S1401 b. The (R)AN sends a UE context release request to the AMF.

S1402. The AMF sends a UE context release command to the (R)AN.

S1403. The (R)AN and the UE complete the connection release procedure.

S1404. The (R)AN sends a UE context release complete message to the AMF.

S1405. The AMF sends a session update session context (PDU sessionupdate SM context) message to the V-SMF.

S1406. The V-SMF deletes an N4 session of the V-UPF according to theinstruction information, and instructs the H-SMF to modify an N4 sessionof an A-UPF. In the foregoing embodiment, the V-SMF obtains eventmonitoring information, and may manage the session based on the eventmonitoring information.

Specifically, the following steps are included.

S1406 a. The V-SMF sends a session release request (N4 session releaserequest) to the V-UPF.

S1406′a. The V-SMF sends a session update request (PDU session updaterequest) to the H-SMF.

S1406 b. The V-UPF sends a session release response (N4 session releaseresponse) to the V-SMF.

S1406′b. The H-SMF sends a session update response (PDU session updateresponse) to the V-SMF.

S1407. The V-SMF sends a session update session management contextresponse (PDU session update session management (SM) contextacknowledgement (ACK)) to the AMF.

FIG. 14 f is a schematic flowchart of still another communicationsmethod according to an embodiment of this application. Thecommunications method may be applied to a multi-UPF scenario. Forexample, in this embodiment, an A-UPF manages an intermediate UPF entity(I-UPF). The method may include the following steps.

S1501 a. UE and a (R)AN perform a connection release procedure.

S1501 b. The (R)AN sends a UE context release request to an AMF.

S1502. The AMF sends a UE context release command to the (R)AN.

S1503. The (R)AN and the UE complete the connection release procedure.

S1504. The (R)AN sends a UE context release complete message to the AMF.

S1505. The AMF sends a session update session context (PDU sessionupdate SM context) message to an SMF.

S1506. The SMF deletes an N4 session of the I-UPF based on eventmonitoring information, and modifies an N4 session of the A-UPF. In theforegoing embodiment, the SMF obtains the event monitoring information,and may manage the session based on the event monitoring information.The N4 session is a session corresponding to service descriptioninformation.

Specifically, the following steps are included.

S1506 a. The SMF sends a session release request (N4 session releaserequest) to the I-UPF.

S1506′a. The SMF sends a session modification request (N4 sessionmodification request) to the A-UPF.

S1506 b. The I-UPF sends a session release response (N4 session releaseresponse) to the SMF.

S1506′b. The A-UPF sends a session modification response (N4 sessionmodification response) to the SMF.

S1507. The SMF sends a session update session management contextresponse (PDU session update SM context ACK) to the AMF.

FIG. 15 is a schematic structural diagram of still anothercommunications apparatus according to an embodiment of this application.The apparatus 5000 may include an instruction unit 51 configured toinstruct a UPF entity to detect a service, where the service is aservice corresponding to a terminal event subscribed to by a firstapplication function entity, a receiving unit 52 configured to receive aservice detection notification sent by the UPF entity, where the servicedetection notification is used to indicate that data of the service isdetected, a monitoring unit 53 configured to, when a terminal isunreachable, monitoring the terminal event based on the servicedetection notification, and a sending unit 54 configured to, when theterminal event is detected, send a terminal event notification to anetwork exposure function entity or the first application functionentity.

In a first possible implementation, the terminal event includes an eventof terminal availability after DDN failure or a terminal reachabilityevent.

In a second possible implementation, the monitoring a terminal event isreceiving a terminal reachability event notification or a notificationon an event of terminal availability after downlink data sending failurethat is sent by the AMF entity.

In a third possible implementation, the apparatus further includes adetermining unit configured to, when the notification on a downlink datasending failure sent by the AMF entity is received or service data of asecond application function entity is detected, determine that theterminal is unreachable if an unreachability notification sent by theAMF entity is received.

In a fourth possible implementation, the receiving unit 52 is furtherconfigured to receive a first message sent by a local session managementfunction entity, where the first message is used to indicate the serviceand instruct to subscribe to the terminal event, and the first messageincludes service description information of the service and an eventcorrelation identifier and event type information of the terminal event,where the event correlation identifier is used to identify a correlationrelationship between the terminal event and a function entity thatsubscribes to the terminal event, and the event type information is usedto identify the terminal event.

For specific implementation of the instruction unit 51, the receivingunit 52, the monitoring unit 53, and the sending unit 54, refer to theembodiments shown in FIG. 13 to FIG. 14 f.

FIG. 16 is a schematic flowchart of still another communications methodaccording to an embodiment of this application.

S1601. A control function entity sends a first message for a terminalevent to an AMF.

When or after UE is registered with a network, the UDM/PCF determines tosubscribe to an event from the AMF. The UDM/PCF determines to subscribeto an event from the AMF. The first message is used to subscribe to aterminal event, and the first message includes service descriptioninformation and a DNN/S-NS SAT. The first message may further include anevent type, an NEF ID, and an NEF reference ID.

S1602. After the AMF receives the first message, the AMF sends a secondmessage to an SMF.

The second message is used to subscribe to a service detection event,and the second message includes the service description information. Thesecond message may further include the event type, the NEF ID, and theNEF reference ID, or includes the event type, an AMF ID, and an AMFreference ID. The AMF reference ID is generated by the AMF and is usedto correlate a corresponding event or event reporting.

In an implementation, the AMF determines whether a DNN/S-NSSAI of a PDUsession that has been set up or that is being set up is the same as theDNN/S-NSSAI included in the first message. When the DNN/S-NSSAI is thesame as the DNN/S-NSSAI included in the first message, the AMF sends thesecond message to the SMF.

In still another implementation, S1602 further includes sending asubscription request to a local session management function entity or aroaming session management function entity, or sending a session contextupdate request to a local session management function entity or aroaming session management function entity, where the session contextupdate request is used to subscribe to the terminal event.

S1603. After receiving the second message, the SMF sends a third messageto a UPF.

The third message is used to instruct to detect a service, and theservice is a service corresponding to the subscribed terminal event.

In an implementation, S1603 includes sending the third message to theUPF entity during or after PDU session deactivation, where the thirdmessage is used to instruct to detect the service, and the service is aservice corresponding to the subscribed terminal event. Specifically,the SMF subscribes to the service detection event from the UPF using anN4 session setup or modification procedure or a new N4 message.

In addition, in another implementation, the third message may be aservice information request, and is used to instruct the UPF entity toreport service information. In this case, S1604 does not need to beperformed. The service information may be at least one of a source IPaddress and a source port number of a downlink data packet, or may beindex information, where the index information is used to index aspecific event. The downlink data packet may be a discarded downlinkdata packet. Optionally, in case of a DDN failure, the sessionmanagement function entity sends the service information request to theUPF entity.

S1604. Optionally, when the received third message is used to instructthe UPF entity to detect a service, the UPF receives the third message,when detecting service data, the UPF sends a service detectionnotification to the SMF.

The service detection notification is used to indicate occurrence of theservice data. In another implementation, the service detectionnotification may be service information, that is, the serviceinformation in S1603. The service information is determined based on thedownlink data packet, and further, is determined based on a packetheader of the received downlink data packet. For example, when thedownlink data packet is an IP data packet, a packet header of thedownlink data packet includes IP quintuple information, when thedownlink data packet is an Ethernet data packet, a packet header of thedownlink data packet includes a MAC address.

S1605. After receiving the service detection notification, the SMF sendsthe service detection notification to the AMF.

The service detection notification carries a reference ID, which is usedto index a specific event. The reference ID is generated by the AMF oran NEF. If the reference ID is generated by the NEF, the NEF ID isoptionally included, to prevent that a particular event cannot beuniquely identified because different NEFs may generate a same referenceID. Optionally, the service detection notification that is formonitoring the terminal event may include event correlation information,for example, an NEF reference ID. The event correlation information isused to determine event reporting information. Optionally, the sessionmanagement function entity sends the event correlation information tothe MME based on the service description information and the serviceinformation. In other words, the session management function entitycompares the service information with the service descriptioninformation, and sends the event correlation information to the MME whenthe service information matches the service description information.

S1606. After receiving the service detection notification, the AMFdetects whether UE is reachable, and activates the foregoing terminalevent when the UE is unreachable.

S1607. When detecting that the UE is reachable, the AMF sends a terminalevent notification to a capability exposure node or an applicationfunction entity.

According to the communications method provided in this embodiment ofthis application, the control function entity may subscribe to theterminal event from the AMF. The AMF activates the terminal event whenreceiving the service detection notification and detecting that theterminal is unreachable, and sends the terminal event notification tothe capability exposure node or the application function entity whendetecting that the terminal is reachable. In this way, a terminal eventmay be subscribed to for a specific service in a 5G architecture.

The following describes the foregoing communications method completelyand in detail with reference to specific scenarios.

For a local breakout (LBO) scenario or a non-roaming scenario, FIG. 17Aand FIG. 17B are a schematic flowchart of still another communicationsmethod according to an embodiment of this application.

S1701. When or after UE is registered with a network, a UDM/PCFdetermines to subscribe to an event from an AMF.

S1702 a. The UDM/PCF (AMF-PCF) sends a subscription request message(Namf_EventExposure) to the AMF, where the message includes an eventtype, an NEF ID, an NEF reference ID, a DNN/S-NS SAL and servicedescription information.

S1702 b. The AMF sends an Namf_EventExposure response message to theUDM/PCF.

S1703. The AMF determines to subscribe to the event from an SMF based onthe DNN/S-NSSAI, and determines whether a DNN/S-NSSAI of a PDU sessionthat has been set up or that is being set up is the same as theDNN/S-NSSAI of the event.

S1704 a. The AMF sends an Nsmf_EventExposure request to the SMF, wherethe request message includes the event type, a service description, theNEF ID, and the NEF reference ID, or includes the event type, a servicedescription, an AMF ID, and an AMF reference ID. The AMF reference ID isgenerated by the AMF and is used to correlate a corresponding event orevent reporting.

S1704 b. The SMF sends an Nsmf_EventExposure response to the AMF.

S1705. The SMF subscribes to a service detection event from a UPF usingan N4 session setup or modification procedure or a new N4 message.

In an implementation, the message may be a service information request,and is used to instruct the UPF entity to report service information. Inthis case, S1706 does not need to be performed. The service informationmay be at least one of a source IP address and a source port number of adownlink data packet, or may be index information, where the indexinformation is used to index a specific event. The downlink data packetmay be a discarded downlink data packet. Optionally, in case of a DDNfailure, the session management function entity sends the serviceinformation request to the UPF entity.

S1706. Optionally, when the received message is used to instruct the UPFentity to detect a service, the UPF receives a data packet sent by anAF.

S1707. When determining that the data packet is the foregoing specificservice, the UPF sends a service detection report to the SMF.

In another implementation, the service detection report may be serviceinformation, that is, the service information in S1703. The serviceinformation is determined based on the downlink data packet, andfurther, is determined based on a packet header of the received downlinkdata packet. For example, when the downlink data packet is an IP datapacket, a packet header of the downlink data packet includes IPquintuple information, when the downlink data packet is an Ethernet datapacket, a packet header of the downlink data packet includes a MACaddress.

S1708. The SMF sends Nsmf_EventExposureNotify to the AMF, where themessage carries the reference ID, which is used to index a specificevent. The reference ID is generated by the AMF or an NEF. If thereference ID is generated by the NEF, the NEF ID is optionally included,to prevent that a particular event cannot be uniquely identified becausedifferent NEFs may generate a same reference ID. Optionally, thenotification that is for monitoring the terminal event may include eventcorrelation information, for example, an event correlation identifier(an NEF reference ID). The event correlation information is used todetermine event reporting information. Optionally, the sessionmanagement function entity sends the event correlation information tothe MME based on the service description information and the serviceinformation. In other words, the session management function entitycompares the service information with the service descriptioninformation, and sends the event correlation information to the MME whenthe service information matches the service description information.

S1709. The AMF activates a specific event if the UE is unreachable.

S1710. The UE initiates a connection to a network.

S1711. The UE enters a reachable state, and the AMF reports a UEreachability event to the NEF.

S1712. The NEF further notifies the AF that the UE is reachable.

For an HR scenario, FIG. 18A and FIG. 18B are a schematic flowchart ofstill another communications method according to an embodiment of thisapplication.

S1801. When or after UE is registered with a network, a UDM/PCFdetermines to subscribe to an event from an AMF.

S1802 a. The UDM/PCF (AMF-PCF) sends an Namf_EventExposure requestmessage to the AMF, where the message includes an event type, an NEF ID,an NEF reference ID, a DNN/S-NSSAI, and service description information.

S1802 b. The AMF sends an Namf_EventExposure response message to theUDM/PCF.

S1803. The AMF determines to subscribe to the event from an H-SMF basedon the DNN/S-NSSAI, and determines whether a DNN/S-NSSAI of a PDUsession that has been set up or that is being set up is the same as theDNN/S-NSSAI of the event.

S1804 a. The AMF sends Nsmf_EventExposure request to the H-SMF, wherethe request message includes the event type, a service description, theNEF ID, and the NEF reference ID, or includes an event type, a servicedescription, an AMF ID, and an AMF reference ID. The AMF reference ID isgenerated by the AMF and is used to correlate a corresponding event orevent reporting.

In addition, in another implementation, the request message may be aservice information request, and is used to instruct the UPF entity toreport service information. In this case, S1806 does not need to beperformed. The service information may be at least one of a source IPaddress and a source port number of a downlink data packet, or may beindex information, where the index information is used to index aspecific event. The downlink data packet may be a discarded downlinkdata packet. Optionally, in case of a DDN failure, the sessionmanagement function entity sends the service information request to theUPF entity.

S1804 b. The H-SMF sends an Nsmf_EventExposure response to the AMF.Optionally, the AMF subscribes to the event from the H-SMF using aV-SMF. The AMF sends event subscription information to the V-SMF.Further, the V-SMF sends the event subscription information to theH-SMF.

S1805. The H-SMF subscribes to a service detection event from an H-UPFusing an N4 session setup or modification procedure or a new N4 message.

S1806. Optionally, when the received subscription request message isused to instruct the UPF entity to detect a service, the H-UPF receivesa data packet sent by an AF.

S1807. When determining that the data packet is the foregoing specificservice, the H-UPF sends a service detection report to the H-SMF. Inanother implementation, the service detection report may be serviceinformation, that is, the service information in S1803. The serviceinformation is determined based on the downlink data packet, andfurther, is determined based on a packet header of the received downlinkdata packet. For example, when the downlink data packet is an IP datapacket, a packet header of the downlink data packet includes IPquintuple information, when the downlink data packet is an Ethernet datapacket, a packet header of the downlink data packet includes a MACaddress.

S1808. The H-SMF sends Nsmf_EventExposureNotify to the AMF, where themessage carries the reference ID, which is used to index a specificevent. The reference ID is generated by the AMF or an NEF. If thereference ID is generated by the NEF, the NEF ID is optionally included,to prevent that a particular event cannot be uniquely identified becausedifferent NEFs may generate a same reference ID. Optionally, the H-SMFsends an event notification to the V-SMF such that the V-SMF sends theevent notification to the AMF.

Optionally, the notification that is for monitoring the terminal eventmay include event correlation information, for example, an eventcorrelation identifier (an NEF reference ID). The event correlationinformation is used to determine event reporting information.Optionally, the session management function entity sends the eventcorrelation information to the MME based on the service descriptioninformation and the service information. In other words, the sessionmanagement function entity compares the service information with theservice description information, and sends the event correlationinformation to the MME when the service information matches the servicedescription information.

S1809. The AMF activates a specific event if the UE is unreachable.

S1810. The UE initiates a connection to a network.

S1811. The UE enters a reachable state, and the AMF reports a UEreachability event to the NEF.

S1812. The NEF further notifies the AF that the UE is reachable.

For an LBO scenario or a non-roaming scenario, FIG. 19A and FIG. 19B area schematic flowchart of still another communications method accordingto an embodiment of this application.

S1901. When or after UE is registered with a network, a UDM/PCFdetermines to subscribe to an event from an AMF.

S1902 a. The UDM/PCF (AMF-PCF) sends an Namf_EventExposure requestmessage to the AMF, where the message includes an event type, an NEF ID,an NEF reference ID, a DNN/S-NS SAL and service description information.

S1902 b. The AMF sends an Namf_EventExposure response message to theUDM/PCF.

S1903. The AMF determines to send an event to an SMF based on theDNN/S-NSSAI, and determines whether a DNN/S-NSSAI of a PDU session thathas been set up or that is being set up is the same as the DNN/S-NSSAIof the event.

S1904 a. The AMF sends an Nsmf_PDUSession_UpdateSMContext request to theSMF, where the request message includes a service description, the NEFID, and the NEF reference ID, or includes a service description, an AMFID, and an AMF reference ID. The AMF reference ID is generated by theAMF and is used to correlate a corresponding event or event reporting.

S1904 b. The SMF sends an Nsmf_PDUSession_UpdateSMContext response tothe AMF.

S1905. The SMF sends service detection information to a UPF using an N4session setup or modification procedure or a new N4 message. Further,optionally, the SMF sends service information to the UPF in a PDUsession deactivation process, and the UPF is a UPF corresponding to anN3 interface. In addition, in another implementation, the subscriptionrequest message may be a service information request, and is used toinstruct the UPF entity to report service information. In this case,S1906 does not need to be performed. The service information may be atleast one of a source IP address and a source port number of a downlinkdata packet, or may be index information, where the index information isused to index a specific event. The downlink data packet may be adiscarded downlink data packet. Optionally, in case of a DDN failure,the session management function entity sends the service informationrequest to the UPF entity.

S1906. Optionally, when the received subscription request message isused to instruct the UPF entity to detect a service, the UPF receives adata packet sent by an AF.

S1907. When determining that the data packet is the foregoing specificservice, the UPF sends a service notification to the SMF using a datanetwork (DN) message. In another implementation, the servicenotification may be service information, that is, the serviceinformation in S1903. The service information is determined based on thedownlink data packet, and further, is determined based on a packetheader of the received downlink data packet. For example, when thedownlink data packet is an IP data packet, a packet header of thedownlink data packet includes IP quintuple information, when thedownlink data packet is an Ethernet data packet, a packet header of thedownlink data packet includes a MAC address.

S1908 a. The SMF sends Namf_Communication_N1N2Message to the AMF, wherethe message carries the reference ID, which is used to index a specificevent. The reference ID is generated by the AMF or an NEF. If thereference ID is generated by the NEF, the NEF ID is optionally included,to prevent that a particular event cannot be uniquely identified becausedifferent NEFs may generate a same reference ID.

Optionally, the notification that is for monitoring the terminal eventmay include event correlation information, for example, an eventcorrelation identifier (an NEF reference ID). The event correlationinformation is used to determine event reporting information.Optionally, the session management function entity sends the eventcorrelation information to the MME based on the service descriptioninformation and the service information. In other words, the sessionmanagement function entity compares the service information with theservice description information, and sends the event correlationinformation to the MME when the service information matches the servicedescription information.

S1908 b. The AMF sends an Namf_Communication_N1N2Message response to theSMF.

S1909. The AMF activates a specific event if the UE is unreachable.

S1910. The UE initiates a connection to a network.

S1911. The UE enters a reachable state, and the AMF reports a UEreachability event to the NEF.

S1912. The NEF further notifies the AF that the UE is reachable.

For an HR scenario, FIG. 20A and FIG. 20B are a schematic flowchart ofstill another communications method according to an embodiment of thisapplication.

S2001. When or after UE is registered with a network, a UDM/PCFdetermines to subscribe to an event from an AMF.

S2002 a. The UDM/PCF (AMF-PCF) sends an Namf_EventExposure requestmessage to the AMF, where the message includes an event type, an NEF ID,an NEF reference ID, a DNN/S-NS SAT, and service descriptioninformation.

S2002 b. The AMF sends an Namf_EventExposure response message to theUDM/PCF.

S2003. The AMF determines to send an event to an SMF based on theDNN/S-NSSAI, and determines whether a DNN/S-NSSAI of a PDU session thathas been set up or that is being set up is the same as the DNN/S-NSSAIof the event.

S2004 a. The AMF sends an Nsmf_PDUSession_UpdateSMContext request to aV-SMF, where the request message includes a service description, the NEFID, and the NEF reference ID, or includes a service description, an AMFID, and an AMF reference ID. The AMF reference ID is generated by theAMF and is used to correlate a corresponding event or event reporting.

S2004 b. The V-SMF sends an Nsmf_PDUSession_UpdateSMContext response tothe AMF.

S2005. The V-SMF sends service detection information to the UPF using anN4 session setup or modification procedure or a new N4 message. Further,optionally, the V-SMF sends service information to the UPF in a PDUsession deactivation process. The UPF is a UPF terminating an N3interface or an N9 interface. In addition, in another implementation, asecond message may be a service information request, and is used toinstruct the UPF entity to report service information. In this case,S2006 does not need to be performed. The service information may be atleast one of a source IP address and a source port number of a downlinkdata packet, or may be index information, where the index information isused to index a specific event. The downlink data packet may be adiscarded downlink data packet. Optionally, in case of a DDN failure,the session management function entity sends the service informationrequest to the UPF entity.

S2006. Optionally, when the received subscription request message isused to instruct the UPF entity to detect a service, the V-UPF receivesa data packet sent by an AF.

S2007. When there is no downlink tunnel, the V-UPF determines that thedata packet is the foregoing specific service, and sends a servicenotification to the V-SMF using a DN message. In another implementation,the service notification may be service information, that is, theservice information in S2003. The service information is determinedbased on the downlink data packet, and further, is determined based on apacket header of the received downlink data packet. For example, whenthe downlink data packet is an IP data packet, a packet header of thedownlink data packet includes IP quintuple information, when thedownlink data packet is an Ethernet data packet, a packet header of thedownlink data packet includes a MAC address.

S2008 a. The V-SMF sends Namf_Communication_N1N2Message to the AMF,where the message carries the reference ID, which is used to index aspecific event. The reference ID is generated by the AMF or an NEF. Ifthe reference ID is generated by the NEF, the NEF ID is optionallyincluded, to prevent that a particular event cannot be uniquelyidentified because different NEFs may generate a same reference ID.Optionally, the notification that is for monitoring the terminal eventmay include event correlation information, for example, an eventcorrelation identifier (an NEF reference ID). The event correlationinformation is used to determine event reporting information.Optionally, the session management function entity sends the eventcorrelation information to the MME based on the service descriptioninformation and the service information. In other words, the sessionmanagement function entity compares the service information with theservice description information, and sends the event correlationinformation to the MIME when the service information matches the servicedescription information.

S2008 b. The AMF sends an Namf_Communication_N1N2Message response to theV-SMF.

S2009. The AMF activates a specific event if the UE is unreachable.

S2010. The UE initiates a connection to a network.

S2011. The UE enters a reachable state, and the AMF reports a UEreachability event to the NEF.

S2012. The NEF further notifies the AF that the UE is reachable.

All or some of the foregoing embodiments may be implemented by means ofsoftware, hardware, firmware, or any combination thereof. When softwareis used to implement the embodiments, the embodiments may be implementedcompletely or partially in a form of a computer program product. Thecomputer program product includes one or more computer instructions.When the computer program instructions are loaded and executed on thecomputer, the procedure or functions according to the embodiments ofthis application are all or partially generated. The computer may be ageneral-purpose computer, a dedicated computer, a computer network, orother programmable apparatuses. The computer instruction may be storedin a computer-readable storage medium, or may be transmitted using thecomputer-readable storage medium. The computer instructions may betransmitted from a website, computer, server, or data center to anotherwebsite, computer, server, or data center in a wired (for example, acoaxial cable, an optical fiber, or a digital subscriber line (DSL)) orwireless (for example, infrared, radio, and microwave, or the like)manner. The computer-readable storage medium may be any usable mediumaccessible by a computer, or a data storage device, such as a server ora data center, integrating one or more usable media. The usable mediummay be a magnetic medium (for example, a floppy disk, a hard disk, or amagnetic tape), an optical medium (for example, a digital versatile disc(DVD)), a semiconductor medium (for example, a solid-state drive (SSD)),or the like.

A person of ordinary skill in the art may understand that all or some ofthe processes of the methods in the embodiments may be implemented by acomputer program instructing relevant hardware. The program may bestored in a computer-readable storage medium. When the program runs, theprocesses of the methods in the embodiments are performed. The foregoingstorage medium includes any medium that can store program code, such asa ROM, a RAM, a magnetic disk, or an optical disc.

What is claimed is:
 1. A communications method, comprising: determining,by a control function entity, a session management function entity basedon at least one of a data network name, slice information, or anapplication function service identifier; sending, by the controlfunction entity to the session management function entity a firstmessage subscribing to a terminal event, wherein the first messagecomprises service description information indicating a servicecorresponding to the terminal event; and receiving, by the sessionmanagement function entity, the first message.
 2. The method of claim 1,wherein the service description information determines an applicationfunction entity that provides a service for a terminal.
 3. The method ofclaim 1, wherein the first message further comprises an eventcorrelation identifier to determine event reporting information, andevent type information of the terminal event to identify the terminalevent.
 4. The method of claim 1, further comprising sending, by thecontrol function entity, a second message to an access and mobilitymanagement function entity subscribing to the terminal event, whereinthe second message comprises an event correlation identifier todetermine event reporting information, and event type information of theterminal event to identify the terminal event.
 5. The method of claim 1,further comprising receiving, by the control function entity, theservice description information from an application function entity. 6.The method of claim 1, wherein the event type comprises an event ofterminal availability after downlink data notification failure.
 7. Themethod of claim 1, further comprising: receiving, by the sessionmanagement function entity, service information from a user planefunction entity based on a downlink data packet; and sending, by thesession management function entity, event correlation information to amobility management entity or a capability exposure entity when theservice information matches the service description information, whereinthe event correlation information determines event reportinginformation.
 8. The method of claim 7, wherein the method furthercomprises sending, by the session management function entity, a serviceinformation request to the user plane function entity.
 9. The method ofclaim 8, wherein sending the service information request to the userplane function entity comprises sending the service information requestto the user plane function entity when unreachability information of auser equipment (UE) is received.
 10. The method of claim 7, whereinsending the event correlation information to the mobility managemententity or the capability exposure entity comprises sending the eventcorrelation information to the mobility management entity or thecapability exposure entity based on the service description informationand the service information, wherein the event correlation informationdetermines the event reporting information.
 11. A communications systemcomprising: a session management function entity configured to receive afirst message; and a control function entity configured to: determinethe session management function entity based on at least one of a datanetwork name, slice information, or an application function serviceidentifier; and send the first message to the session managementfunction entity subscribing to a terminal event, wherein the firstmessage comprises service description information indicating a servicecorresponding to the terminal event.
 12. The system of claim 11, whereinthe service description information determines an application functionentity that provides a service for a terminal, and wherein thecommunications system comprises a 5^(th) generation (5G) system.
 13. Thesystem of claim 11, wherein the first message further comprises an eventcorrelation identifier to determine event reporting information andevent type information of the terminal event to identify the terminalevent.
 14. The system of claim 11, the control function entity isfurther configured to send a second message to an access and mobilitymanagement function entity subscribing to the terminal event, whereinthe second message comprises an event correlation identifier todetermine event reporting information and event type information of theterminal event to identify the terminal event.
 15. The system of claim11, the control function entity is further configured to receive theservice description information from an application function entity. 16.The system of claim 11, wherein the event type of the terminal eventcomprises an event of terminal availability after downlink datanotification failure.
 17. The system of claim 11, wherein the sessionmanagement function entity is further configured to: receive serviceinformation from a user plane function entity based on a downlink datapacket; and send event correlation information to a mobility managemententity or a capability exposure entity based on the service information,wherein the event correlation information determines event reportinginformation.
 18. The system of claim 17, wherein the session managementfunction entity is further configured to send a service informationrequest to the user plane function entity.
 19. The system of claim 18,wherein the session management function entity is further configured tosend the service information request to the user plane function entitywhen unreachability information of a user equipment (UE) is received.20. The system of claim 17, wherein the session management functionentity is further configured to send the event correlation informationto the mobility management entity or the capability exposure entitybased on the service description information and the serviceinformation, wherein the event correlation information determines theevent reporting information.